From 28cc719b7b9f3e9d552fdd8d8baa6719bac86da5 Mon Sep 17 00:00:00 2001 From: Jason Witkowski Date: Wed, 7 Dec 2022 13:10:23 -0500 Subject: [PATCH] fix: Stop network_plugin/cni dependency when include_role comes from reset role --- roles/network_plugin/cilium/meta/main.yml | 1 + roles/network_plugin/flannel/meta/main.yml | 1 + roles/network_plugin/kube-router/meta/main.yml | 1 + roles/network_plugin/macvlan/meta/main.yml | 1 + roles/network_plugin/multus/meta/main.yml | 1 + roles/network_plugin/weave/meta/main.yml | 1 + roles/reset/tasks/main.yml | 2 ++ 7 files changed, 8 insertions(+) diff --git a/roles/network_plugin/cilium/meta/main.yml b/roles/network_plugin/cilium/meta/main.yml index 9b7065f18..d66a887a1 100644 --- a/roles/network_plugin/cilium/meta/main.yml +++ b/roles/network_plugin/cilium/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - role: network_plugin/cni + when: not from_reset | default(true) diff --git a/roles/network_plugin/flannel/meta/main.yml b/roles/network_plugin/flannel/meta/main.yml index 9b7065f18..d66a887a1 100644 --- a/roles/network_plugin/flannel/meta/main.yml +++ b/roles/network_plugin/flannel/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - role: network_plugin/cni + when: not from_reset | default(true) diff --git a/roles/network_plugin/kube-router/meta/main.yml b/roles/network_plugin/kube-router/meta/main.yml index 9b7065f18..d66a887a1 100644 --- a/roles/network_plugin/kube-router/meta/main.yml +++ b/roles/network_plugin/kube-router/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - role: network_plugin/cni + when: not from_reset | default(true) diff --git a/roles/network_plugin/macvlan/meta/main.yml b/roles/network_plugin/macvlan/meta/main.yml index 9b7065f18..d66a887a1 100644 --- a/roles/network_plugin/macvlan/meta/main.yml +++ b/roles/network_plugin/macvlan/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - role: network_plugin/cni + when: not from_reset | default(true) diff --git a/roles/network_plugin/multus/meta/main.yml b/roles/network_plugin/multus/meta/main.yml index 9b7065f18..d66a887a1 100644 --- a/roles/network_plugin/multus/meta/main.yml +++ b/roles/network_plugin/multus/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - role: network_plugin/cni + when: not from_reset | default(true) diff --git a/roles/network_plugin/weave/meta/main.yml b/roles/network_plugin/weave/meta/main.yml index 9b7065f18..d66a887a1 100644 --- a/roles/network_plugin/weave/meta/main.yml +++ b/roles/network_plugin/weave/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - role: network_plugin/cni + when: not from_reset | default(true) diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 60f9d015d..7af37e333 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -381,6 +381,8 @@ include_role: name: "network_plugin/{{ kube_network_plugin }}" tasks_from: reset + vars: + from_reset: true when: - kube_network_plugin in ['flannel', 'cilium', 'kube-router', 'calico'] tags: