Fix service and conditional

role_nftables
Ruakij 2 years ago
parent 0d43d07ad4
commit dadd077723

@ -7,6 +7,7 @@
delay: 10 delay: 10
- name: Restart when config changed, but install already done - name: Restart when config changed, but install already done
service: k3s service:
name: k3s
status: restarted status: restarted
when: "inventory_hostname != groups['kubernetes'][0] && !command.changed && config.changed" when: "inventory_hostname != groups['kubernetes'][0] and not command.changed and config.changed"

@ -5,9 +5,10 @@
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 - name: Restart when config changed, but install already done
service: k3s service:
name: k3s
status: restarted status: restarted
when: "inventory_hostname == groups['kubernetes'][0] && !command.changed && config.changed" when: "inventory_hostname == groups['kubernetes'][0] and not command.changed and 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:
@ -26,9 +27,10 @@
delay: 10 delay: 10
- name: Restart when config changed, but install already done - name: Restart when config changed, but install already done
service: k3s service:
name: k3s
status: restarted status: restarted
when: "inventory_hostname != groups['kubernetes'][0] && !command.changed && config.changed" when: "inventory_hostname != groups['kubernetes'][0] and not command.changed and 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:

Loading…
Cancel
Save