diff --git a/roles/kubernetes/secrets/tasks/gen_certs.yml b/roles/kubernetes/secrets/tasks/gen_certs.yml index 280aa2182..37568d694 100644 --- a/roles/kubernetes/secrets/tasks/gen_certs.yml +++ b/roles/kubernetes/secrets/tasks/gen_certs.yml @@ -39,8 +39,7 @@ content: "{{ item.content|b64decode }}" dest: "{{ item.source }}" with_items: '{{slurp_certs.results}}' - when: item.item in master_certs and - inventory_hostname in groups['kube-master'] and sync_certs|default(false) and + when: inventory_hostname in groups['kube-master'] and sync_certs|default(false) and inventory_hostname != groups['kube-master'][0] - name: certs | Copy certs on nodes