diff --git a/roles/container-engine/containerd/defaults/main.yml b/roles/container-engine/containerd/defaults/main.yml index bac182fc04d29a828bbf03e23a26bb4d17bc271d..871994337957aad18219cf3d755cce180e3d097b 100644 --- a/roles/container-engine/containerd/defaults/main.yml +++ b/roles/container-engine/containerd/defaults/main.yml @@ -14,7 +14,7 @@ containerd_config: containerd_cfg_dir: /etc/containerd # Path to runc binary -runc_binary: /usr/sbin/runc +runc_binary: /usr/bin/runc yum_repo_dir: /etc/yum.repos.d diff --git a/roles/container-engine/containerd/tasks/containerd_repo.yml b/roles/container-engine/containerd/tasks/containerd_repo.yml index 5614b06d725db5a082de8225ff692c82513439c8..d4aa2167e37accdf58c07acb2b99bcb4a7308b5c 100644 --- a/roles/container-engine/containerd/tasks/containerd_repo.yml +++ b/roles/container-engine/containerd/tasks/containerd_repo.yml @@ -65,18 +65,3 @@ when: - ansible_distribution in ["CentOS","RedHat"] - yum_result.results | length == 0 - -- name: Copy yum.conf for editing - copy: - src: "{{ yum_conf }}" - dest: "{{ containerd_yum_conf }}" - remote_src: yes - when: ansible_distribution in ["CentOS","RedHat"] - -- name: Edit copy of yum.conf to set obsoletes=0 - lineinfile: - path: "{{ containerd_yum_conf }}" - state: present - regexp: '^obsoletes=' - line: 'obsoletes=0' - when: ansible_distribution in ["CentOS","RedHat"] diff --git a/roles/container-engine/containerd/tasks/main.yml b/roles/container-engine/containerd/tasks/main.yml index 9524e109751383b132db08ba19672d21ef7441b2..82e7f7664cef053efdd3f0ac504f411b1bea008d 100644 --- a/roles/container-engine/containerd/tasks/main.yml +++ b/roles/container-engine/containerd/tasks/main.yml @@ -95,9 +95,9 @@ args: pkg: "{{ item.name }}" force: "{{ item.force | default(omit) }}" - conf_file: "{{ item.yum_conf | default(omit) }}" state: present update_cache: "{{ omit if ansible_distribution == 'Fedora' else True }}" + enablerepo: "{{ item.repo | default(omit) }}" register: containerd_task_result until: containerd_task_result is succeeded retries: 4 @@ -109,26 +109,6 @@ - containerd_package_info.pkgs|length > 0 ignore_errors: true -- name: Check if runc is installed - stat: - path: "{{ runc_binary }}" - register: runc_stat - -- name: Install runc package if necessary - action: "{{ containerd_package_info.pkg_mgr }}" - args: - pkg: runc - state: present - update_cache: "{{ omit if ansible_distribution == 'Fedora' else True }}" - register: runc_task_result - until: runc_task_result is succeeded - retries: 4 - delay: "{{ retry_stagger | d(3) }}" - notify: restart containerd - when: - - not is_ostree - - not runc_stat.stat.exists - - name: Ensure latest version of libseccomp installed # noqa 403 package: name: libseccomp diff --git a/roles/container-engine/containerd/templates/fedora_containerd.repo.j2 b/roles/container-engine/containerd/templates/fedora_containerd.repo.j2 index a76b469a146855281e849496f018e451bb7a1003..8422664a6d8012ad0546cb00ef41c5f829dedede 100644 --- a/roles/container-engine/containerd/templates/fedora_containerd.repo.j2 +++ b/roles/container-engine/containerd/templates/fedora_containerd.repo.j2 @@ -1,7 +1,7 @@ [docker-ce] name=Docker-CE Repository baseurl={{ containerd_fedora_repo_base_url }} -enabled=1 +enabled=0 gpgcheck={{ '1' if containerd_fedora_repo_gpgkey else '0' }} gpgkey={{ containerd_fedora_repo_gpgkey }} {% if http_proxy is defined %}proxy={{ http_proxy }}{% endif %} diff --git a/roles/container-engine/containerd/templates/rh_containerd.repo.j2 b/roles/container-engine/containerd/templates/rh_containerd.repo.j2 index a8a04f60f78ec876e58794cca31d7f16627661cd..178bbc2cd7f8efbe0b13fcdf42e22cce18ac624e 100644 --- a/roles/container-engine/containerd/templates/rh_containerd.repo.j2 +++ b/roles/container-engine/containerd/templates/rh_containerd.repo.j2 @@ -1,13 +1,10 @@ [docker-ce] name=Docker-CE Repository baseurl={{ docker_rh_repo_base_url }} -enabled=1 +enabled=0 gpgcheck={{ '1' if docker_rh_repo_gpgkey else '0' }} keepcache={{ docker_rpm_keepcache | default('1') }} gpgkey={{ docker_rh_repo_gpgkey }} {% if http_proxy is defined %} proxy={{ http_proxy }} {% endif %} -{% if ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 %} -module_hotfixes=True -{% endif %} diff --git a/roles/container-engine/containerd/vars/debian.yml b/roles/container-engine/containerd/vars/debian.yml index 108625d32e99ad9ec9be266bdac3d42f62bf1b98..a1a9adab480971895b89eb0fc416c97637a79c93 100644 --- a/roles/container-engine/containerd/vars/debian.yml +++ b/roles/container-engine/containerd/vars/debian.yml @@ -18,5 +18,3 @@ containerd_repo_info: deb {{ containerd_debian_repo_base_url }} {{ ansible_distribution_release|lower }} {{ containerd_debian_repo_component }} - -runc_binary: /usr/bin/runc diff --git a/roles/container-engine/containerd/vars/fedora.yml b/roles/container-engine/containerd/vars/fedora.yml index dbbbee722b16db0a074d0c43c620d05b3b9890da..4f7703f50a2bb9a8c9d9e55fae948dbee43ad057 100644 --- a/roles/container-engine/containerd/vars/fedora.yml +++ b/roles/container-engine/containerd/vars/fedora.yml @@ -3,5 +3,3 @@ containerd_package_info: pkg_mgr: dnf pkgs: - name: "{{ containerd_versioned_pkg[containerd_version | string] }}" - -runc_binary: /usr/bin/runc diff --git a/roles/container-engine/containerd/vars/redhat.yml b/roles/container-engine/containerd/vars/redhat.yml index d375d1493b03dc4dab889363f691a06a1dd55476..c2cc3c267b9489cc9544f3bec4a003f32cd0e2bb 100644 --- a/roles/container-engine/containerd/vars/redhat.yml +++ b/roles/container-engine/containerd/vars/redhat.yml @@ -3,10 +3,7 @@ containerd_package_info: pkg_mgr: yum pkgs: - name: "{{ containerd_versioned_pkg[containerd_version | string] }}" - -containerd_pkgs: - - name: "{{ containerd_versioned_pkg[containerd_version | string] }}" - yum_conf: "{{ containerd_yum_conf }}" + repo: "docker-ce" containerd_repo_key_info: pkg_key: '' @@ -15,5 +12,3 @@ containerd_repo_key_info: containerd_repo_info: pkg_repo: '' repos: [] - -runc_binary: /bin/runc diff --git a/roles/container-engine/containerd/vars/ubuntu-amd64.yml b/roles/container-engine/containerd/vars/ubuntu-amd64.yml index 013df15379f27287a91785da62d723bec19b07d7..0d247f841dc51f267e6a535ca4884996380a0104 100644 --- a/roles/container-engine/containerd/vars/ubuntu-amd64.yml +++ b/roles/container-engine/containerd/vars/ubuntu-amd64.yml @@ -18,5 +18,3 @@ containerd_repo_info: deb {{ containerd_ubuntu_repo_base_url }} {{ ansible_distribution_release|lower }} {{ containerd_ubuntu_repo_component }} - -runc_binary: /usr/bin/runc diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index 94d314f322291f6b4575896c201f9f3b72707674..bfdc2ebe642eb49edc6c351343e54cb775fff2d2 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -166,6 +166,7 @@ conf_file: "{{ item.yum_conf|default(omit) }}" state: "{{ item.state | default('present') }}" update_cache: "{{ omit if ansible_distribution == 'Fedora' else True }}" + enablerepo: "{{ item.repo | default(omit) }}" register: docker_task_result until: docker_task_result is succeeded retries: 4 diff --git a/roles/container-engine/docker/templates/rh_docker.repo.j2 b/roles/container-engine/docker/templates/rh_docker.repo.j2 index a8a04f60f78ec876e58794cca31d7f16627661cd..178bbc2cd7f8efbe0b13fcdf42e22cce18ac624e 100644 --- a/roles/container-engine/docker/templates/rh_docker.repo.j2 +++ b/roles/container-engine/docker/templates/rh_docker.repo.j2 @@ -1,13 +1,10 @@ [docker-ce] name=Docker-CE Repository baseurl={{ docker_rh_repo_base_url }} -enabled=1 +enabled=0 gpgcheck={{ '1' if docker_rh_repo_gpgkey else '0' }} keepcache={{ docker_rpm_keepcache | default('1') }} gpgkey={{ docker_rh_repo_gpgkey }} {% if http_proxy is defined %} proxy={{ http_proxy }} {% endif %} -{% if ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 %} -module_hotfixes=True -{% endif %} diff --git a/roles/container-engine/docker/vars/redhat.yml b/roles/container-engine/docker/vars/redhat.yml index fb12b67ac8cbbc3ac70e502f88f0a540d1d1f4c2..f9e2fe60684dd6acdb9075b5943fece25f88c1c2 100644 --- a/roles/container-engine/docker/vars/redhat.yml +++ b/roles/container-engine/docker/vars/redhat.yml @@ -30,16 +30,21 @@ docker_selinux_versioned_pkg: docker_pkgs_use_docker_ce: - name: "{{ docker_selinux_versioned_pkg[docker_selinux_version | string] }}" yum_conf: "{{ docker_yum_conf }}" + repo: "docker-ce" - name: "{{ docker_versioned_pkg[docker_version | string] }}" yum_conf: "{{ docker_yum_conf }}" + repo: "docker-ce" docker_pkgs: - name: "{{ containerd_versioned_pkg[containerd_version | string] }}" yum_conf: "{{ docker_yum_conf }}" + repo: "docker-ce" - name: "{{ docker_cli_versioned_pkg[docker_cli_version | string] }}" yum_conf: "{{ docker_yum_conf }}" + repo: "docker-ce" - name: "{{ docker_versioned_pkg[docker_version | string] }}" yum_conf: "{{ docker_yum_conf }}" + repo: "docker-ce" docker_package_info: pkg_mgr: yum