|
|
@ -2,7 +2,7 @@
|
|
|
|
command: /root/k3s_install.sh {{ type }}
|
|
|
|
command: /root/k3s_install.sh {{ type }}
|
|
|
|
when: "inventory_hostname == groups['kubernetes'][0]"
|
|
|
|
when: "inventory_hostname == groups['kubernetes'][0]"
|
|
|
|
register: command
|
|
|
|
register: command
|
|
|
|
changed_when: "'No change detected' in command.stdout"
|
|
|
|
changed_when: "'No change detected' not in command.stdout"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Restart when config changed, but install already done
|
|
|
|
- name: Restart when config changed, but install already done
|
|
|
|
service:
|
|
|
|
service:
|
|
|
@ -21,7 +21,7 @@
|
|
|
|
command: /root/k3s_install.sh {{ type }}
|
|
|
|
command: /root/k3s_install.sh {{ type }}
|
|
|
|
when: "inventory_hostname != groups['kubernetes'][0]"
|
|
|
|
when: "inventory_hostname != groups['kubernetes'][0]"
|
|
|
|
register: command
|
|
|
|
register: command
|
|
|
|
changed_when: "'No change detected' in command.stdout"
|
|
|
|
changed_when: "'No change detected' not in command.stdout"
|
|
|
|
until: "command is not failed"
|
|
|
|
until: "command is not failed"
|
|
|
|
retries: 2
|
|
|
|
retries: 2
|
|
|
|
delay: 10
|
|
|
|
delay: 10
|
|
|
|