283c4169ac
reorder master handlers typo for sysvinit
24 lines
867 B
YAML
24 lines
867 B
YAML
---
|
|
- name: tokens | generate tokens for master components
|
|
command: "{{ kube_script_dir }}/kube-gen-token.sh {{ item[0] }}-{{ item[1] }}"
|
|
environment:
|
|
TOKEN_DIR: "{{ kube_token_dir }}"
|
|
with_nested:
|
|
- [ "system:kubectl" ]
|
|
- "{{ groups['kube-master'] }}"
|
|
register: gentoken_master
|
|
changed_when: "'Added' in gentoken_master.stdout"
|
|
when: inventory_hostname == groups['kube-master'][0]
|
|
notify: restart kube-apiserver
|
|
|
|
- name: tokens | generate tokens for node components
|
|
command: "{{ kube_script_dir }}/kube-gen-token.sh {{ item[0] }}-{{ item[1] }}"
|
|
environment:
|
|
TOKEN_DIR: "{{ kube_token_dir }}"
|
|
with_nested:
|
|
- [ 'system:kubelet' ]
|
|
- "{{ groups['kube-node'] }}"
|
|
register: gentoken_node
|
|
changed_when: "'Added' in gentoken_node.stdout"
|
|
when: inventory_hostname == groups['kube-master'][0]
|
|
notify: restart kube-apiserver
|