diff --git a/test/e2e/playbook/provision.yaml b/test/e2e/playbook/provision.yaml index 4e1b72805..c6a6f7482 100644 --- a/test/e2e/playbook/provision.yaml +++ b/test/e2e/playbook/provision.yaml @@ -290,12 +290,38 @@ - name: Configure containerd when: is_containerd - ansible.builtin.shell: "{{ item }}" - with_items: - - mkdir -p /etc/containerd - - containerd config default > /etc/containerd/config.toml - - sed -i 's/^.*disabled_plugins *= *.*$/disabled_plugins = []/' /etc/containerd/config.toml - - sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml + block: + - name: Create containerd configuration + ansible.builtin.shell: "{{ item }}" + with_items: + - mkdir -p /etc/containerd + - containerd config default > /etc/containerd/config.toml + - sed -i 's/^.*disabled_plugins *= *.*$/disabled_plugins = []/' /etc/containerd/config.toml + - sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml + + - name: Update CNI plugin directory on Fedora + when: ansible_facts['distribution'] == "Fedora" + ansible.builtin.lineinfile: + path: /etc/containerd/config.toml + regexp: ' *bin_dir *= *"/opt/cni/bin" *' + line: 'bin_dir = "/usr/libexec/cni"' + + - name: Configure bridge CNI plugin + when: cni_plugin == "bridge" + block: + - name: Copy CNI bridge plugin configuration + ansible.builtin.copy: + src: "{{ nri_resource_policy_src }}/test/e2e/files/10-bridge.conf.in" + dest: "/etc/cni/net.d/10-bridge.conf" + owner: root + group: root + mode: '0644' + + - name: Update CNI bridge plugin configuration + ansible.builtin.replace: + path: /etc/cni/net.d/10-bridge.conf + regexp: '(CNI_NETWORK)' + replace: "{{ network }}" - name: Setup NRI ansible.builtin.file: @@ -417,23 +443,6 @@ - cilium install --wait - cilium status --wait - - name: Configure bridge CNI plugin - when: cni_plugin == "bridge" - block: - - name: Copy CNI bridge plugin configuration - ansible.builtin.copy: - src: "{{ nri_resource_policy_src }}/test/e2e/files/10-bridge.conf.in" - dest: "/etc/cni/net.d/10-bridge.conf" - owner: root - group: root - mode: '0644' - - - name: Update CNI bridge plugin configuration - ansible.builtin.replace: - path: /etc/cni/net.d/10-bridge.conf - regexp: 'CNI_NETWORK' - replace: "{{ network }}" - - name: Generate join command ansible.builtin.command: cmd: kubeadm token create --print-join-command