From 9e7c1c8aae506018392d759fd0fa6670b640a418 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 9 May 2018 16:31:14 -0500 Subject: [PATCH] Fix idempotence for Flannel networking task. --- tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 117db88..11e942a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -67,7 +67,9 @@ - kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml - kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-rbac.yml register: flannel_networking_result - changed_when: "'unchanged' not in flannel_networking_result.stdout" + changed_when: > + ('unchanged' not in flannel_networking_result.stdout) + or ('configured' not in flannel_networking_result.stdout) # TODO: Check if taint exists with something like `kubectl describe nodes` # instead of using kubernetes_init_stat.stat.exists check.