diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-07-19 11:48:48 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-08-03 17:20:52 +0200 |
commit | 3003a54811227f5434a8a3d7c8d54c3accafd1e3 (patch) | |
tree | b0c649243cec6a09c9bf22e0871f8c5b3c1f9785 /roles/docker/tasks | |
parent | f863a5bcffdcdbc4e54d7551a752b5a6f1253024 (diff) | |
download | openshift-3003a54811227f5434a8a3d7c8d54c3accafd1e3.tar.gz openshift-3003a54811227f5434a8a3d7c8d54c3accafd1e3.tar.bz2 openshift-3003a54811227f5434a8a3d7c8d54c3accafd1e3.tar.xz openshift-3003a54811227f5434a8a3d7c8d54c3accafd1e3.zip |
crio: use a template for the configuration
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r-- | roles/docker/tasks/systemcontainer_crio.yml | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml index f88f167c7..7c3ed90d8 100644 --- a/roles/docker/tasks/systemcontainer_crio.yml +++ b/roles/docker/tasks/systemcontainer_crio.yml @@ -1,7 +1,7 @@ --- # TODO: Much of this file is shared with container engine tasks - set_fact: - l_insecure_registries: "{{ '\"{}\"'.format('\", \"'.join(openshift.docker.insecure_registries)) }}" + l_insecure_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(openshift.docker.insecure_registries)) }}" - name: Ensure container-selinux is installed package: @@ -96,30 +96,11 @@ image: "{{ l_crio_image }}" state: latest -- name: run CRI-O with overlay2 - replace: - regexp: 'storage_driver = ""' - replace: 'storage_driver = "overlay2"' - name: /etc/crio/crio.conf - backup: yes - -- name: Add overlay2 storage opts for CRI-O - lineinfile: +- name: Create the CRI-O configuration + template: dest: /etc/crio/crio.conf - line: '"overlay2.override_kernel_check=1"' - insertafter: 'storage_option = \[' - regexp: 'overlay2\.override_kernel_check=1' - state: present - when: ansible_distribution in ['RedHat', 'CentOS'] - -- name: Configure insecure registries for CRI-O - lineinfile: - dest: /etc/crio/crio.conf - line: "{{ l_insecure_registries }}" - insertafter: 'insecure_registries = \[' - regexp: "{{ l_insecure_registries }}" - state: present - when: openshift_docker_insecure_registries is defined + src: crio.conf.j2 + backup: yes - name: Start the CRI-O service systemd: |