From 35f045771d27e404ef95d2ab8ab23f59060bed78 Mon Sep 17 00:00:00 2001 From: Calin Cristian Andrei Date: Wed, 10 Nov 2021 16:00:10 +0000 Subject: [PATCH] Containerd: when deploying with containerd we need to ensure iptables and ipset are in place or risk breaking things like weave --- .../container-engine/containerd-common/defaults/main.yml | 5 +++++ roles/container-engine/containerd-common/tasks/main.yml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/roles/container-engine/containerd-common/defaults/main.yml b/roles/container-engine/containerd-common/defaults/main.yml index 3a85d7f05d4..c4d9eec14f8 100644 --- a/roles/container-engine/containerd-common/defaults/main.yml +++ b/roles/container-engine/containerd-common/defaults/main.yml @@ -15,3 +15,8 @@ containerd_ubuntu_repo_component: "stable" # Debian docker-ce repo containerd_debian_repo_base_url: "https://download.docker.com/linux/debian" containerd_debian_repo_component: "stable" + +# Mandatory packages +containerd_mandatory_packages: + - iptables + - ipset diff --git a/roles/container-engine/containerd-common/tasks/main.yml b/roles/container-engine/containerd-common/tasks/main.yml index cfd78f3a379..43840b76b0b 100644 --- a/roles/container-engine/containerd-common/tasks/main.yml +++ b/roles/container-engine/containerd-common/tasks/main.yml @@ -29,3 +29,11 @@ skip: true tags: - facts + +- name: containerd-common | ensure mandatory packages are present + package: + name: "{{ containerd_mandatory_packages }}" + state: present + when: + - not is_ostree + - ansible_distribution not in ["Flatcar Container Linux by Kinvolk", "Flatcar"]