From b9a949820a0d8269054f95b05187ef8366ece624 Mon Sep 17 00:00:00 2001 From: woopstar Date: Sun, 18 Mar 2018 08:42:36 +0100 Subject: [PATCH] Only copy tokens if tokens_list contains any --- roles/kubernetes/secrets/tasks/gen_tokens.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/secrets/tasks/gen_tokens.yml b/roles/kubernetes/secrets/tasks/gen_tokens.yml index a4cc0f69b..df47d157d 100644 --- a/roles/kubernetes/secrets/tasks/gen_tokens.yml +++ b/roles/kubernetes/secrets/tasks/gen_tokens.yml @@ -55,4 +55,4 @@ - name: Gen_tokens | Copy tokens on masters shell: "echo '{{ tokens_data.stdout|quote }}' | base64 -d | tar xz -C /" when: inventory_hostname in groups['kube-master'] and sync_tokens|default(false) and - inventory_hostname != groups['kube-master'][0] + inventory_hostname != groups['kube-master'][0] and tokens_data.stdout != ''