|
|
@ -4,6 +4,11 @@
|
|
|
|
register: command
|
|
|
|
register: command
|
|
|
|
changed_when: "'No change detected' in command.stdout"
|
|
|
|
changed_when: "'No change detected' in command.stdout"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Restart when config changed, but install already done
|
|
|
|
|
|
|
|
service: k3s
|
|
|
|
|
|
|
|
status: restarted
|
|
|
|
|
|
|
|
when: "inventory_hostname == groups['kubernetes'][0] && !command.changed && config.changed"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Waiting for K3s-server to accept connections
|
|
|
|
- name: Waiting for K3s-server to accept connections
|
|
|
|
ansible.builtin.wait_for:
|
|
|
|
ansible.builtin.wait_for:
|
|
|
|
host: "{{ inventory_hostname }}"
|
|
|
|
host: "{{ inventory_hostname }}"
|
|
|
@ -20,6 +25,11 @@
|
|
|
|
retries: 2
|
|
|
|
retries: 2
|
|
|
|
delay: 10
|
|
|
|
delay: 10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Restart when config changed, but install already done
|
|
|
|
|
|
|
|
service: k3s
|
|
|
|
|
|
|
|
status: restarted
|
|
|
|
|
|
|
|
when: "inventory_hostname != groups['kubernetes'][0] && !command.changed && config.changed"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Waiting for K3s-server to accept connections on other nodes
|
|
|
|
- name: Waiting for K3s-server to accept connections on other nodes
|
|
|
|
ansible.builtin.wait_for:
|
|
|
|
ansible.builtin.wait_for:
|
|
|
|
host: "{{ inventory_hostname }}"
|
|
|
|
host: "{{ inventory_hostname }}"
|
|
|
|