copy tokens to other masters
- include: gen_tokens.yml
when: inventory_hostname == groups['masters'][0]
+
+- name: Copy tokens to other masters
+ synchronize:
+ src: /etc/kubernetes/tokens/
+ dest: /etc/kubernetes/tokens
+ delegate_to: "{{ groups['masters'][0] }}"
+ when: inventory_hostname in groups['masters'] and inventory_hostname != groups['masters'][0]
+ notify:
+ - restart daemons
+ tags:
+ - secrets
+ - configure
