diff --git a/kubernetes/tasks/install/agent/install_k3s.yml b/kubernetes/tasks/install/agent/install_k3s.yml index 94a064a..87bd64b 100644 --- a/kubernetes/tasks/install/agent/install_k3s.yml +++ b/kubernetes/tasks/install/agent/install_k3s.yml @@ -1,7 +1,7 @@ - name: Install K3s agent command: /root/k3s_install.sh {{ type }} register: command - changed_when: "'No change detected' in command.stdout" + changed_when: "'No change detected' not in command.stdout" until: "command is not failed" retries: 2 delay: 10 diff --git a/kubernetes/tasks/install/server/install_k3s.yml b/kubernetes/tasks/install/server/install_k3s.yml index b4a3076..620b5f9 100644 --- a/kubernetes/tasks/install/server/install_k3s.yml +++ b/kubernetes/tasks/install/server/install_k3s.yml @@ -2,7 +2,7 @@ command: /root/k3s_install.sh {{ type }} when: "inventory_hostname == groups['kubernetes'][0]" 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 service: @@ -21,7 +21,7 @@ command: /root/k3s_install.sh {{ type }} when: "inventory_hostname != groups['kubernetes'][0]" register: command - changed_when: "'No change detected' in command.stdout" + changed_when: "'No change detected' not in command.stdout" until: "command is not failed" retries: 2 delay: 10