diff --git a/roles/container-engine/containerd/tasks/main.yml b/roles/container-engine/containerd/tasks/main.yml index 41b8df6743ae71b88aab707e47c9ca7901aa7da2..c2369daadd02ab42d67e99a4a1bde9d1fd150032 100644 --- a/roles/container-engine/containerd/tasks/main.yml +++ b/roles/container-engine/containerd/tasks/main.yml @@ -129,4 +129,13 @@ - not is_ostree - not runc_stat.stat.exists +- name: Ensure latest version of libseccomp installed # noqa 403 + package: + name: libseccomp + state: latest + when: + - ansible_distribution == "CentOS" + - ansible_distribution_major_version == "8" + notify: restart containerd + - include_tasks: crictl.yml diff --git a/roles/container-engine/cri-o/tasks/main.yaml b/roles/container-engine/cri-o/tasks/main.yaml index 2707a34326b95ce4ba8c09f54cda28f12a1fa03b..92ef26ad64fb6ec914835fcd7af67cfce8aafc07 100644 --- a/roles/container-engine/cri-o/tasks/main.yaml +++ b/roles/container-engine/cri-o/tasks/main.yaml @@ -83,19 +83,13 @@ retries: 4 delay: "{{ retry_stagger | d(3) }}" -- name: Gather the rpm package facts - package_facts: - manager: auto - when: - - ansible_distribution == "CentOS" - - ansible_distribution_major_version == "8" - -- name: Ensure latest version of libseccom installed # noqa 303 - command: "yum update -y libseccomp" +- name: Ensure latest version of libseccomp installed # noqa 403 + package: + name: libseccomp + state: latest when: - ansible_distribution == "CentOS" - ansible_distribution_major_version == "8" - - ansible_facts.packages['libseccomp'] | map(attribute='version') | map('regex_replace','^(?P<major>\\d+).(?P<minor>\\d+).(?P<patch>\\d+)$', '\\g<major>.\\g<minor>') | list | first == '2.3' notify: restart crio - name: Check if already installed diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index d6bc6f555137188a6af0e9797b12c100debe8953..67a22b42df8cb36e60d076938078a77bcdd0621a 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -211,6 +211,15 @@ selection: hold when: ansible_os_family in ["Debian"] +- name: Ensure latest version of libseccomp installed # noqa 403 + package: + name: libseccomp + state: latest + when: + - ansible_distribution == "CentOS" + - ansible_distribution_major_version == "8" + notify: restart docker + - name: ensure docker started, remove our config if docker start failed and try again block: - name: ensure service is started if docker packages are already present