diff --git a/ansible/playbooks/upgrade_k3s_aerodrome.yml b/ansible/playbooks/upgrade_k3s_aerodrome.yml index 4826452..b944272 100644 --- a/ansible/playbooks/upgrade_k3s_aerodrome.yml +++ b/ansible/playbooks/upgrade_k3s_aerodrome.yml @@ -23,12 +23,14 @@ curl -sfL "https://github.com/k3s-io/k3s/releases/download/${ENCODED_VER}/k3s-arm64" -o /usr/local/bin/k3s.new chmod +x /usr/local/bin/k3s.new mv /usr/local/bin/k3s.new /usr/local/bin/k3s + when: target_k3s_version not in pre_k3s_ver.stdout register: k3s_download - name: Restart K3s systemd service ansible.builtin.systemd: name: k3s state: restarted + when: target_k3s_version not in pre_k3s_ver.stdout - name: Wait for K3s systemd unit to report active ansible.builtin.command: systemctl is-active k3s @@ -37,6 +39,7 @@ retries: 20 delay: 4 changed_when: false + when: target_k3s_version not in pre_k3s_ver.stdout - name: Wait for upgraded node to report Ready in Kubernetes ansible.builtin.command: kubectl get node {{ inventory_hostname }} -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}' @@ -46,6 +49,7 @@ retries: 30 delay: 5 changed_when: false + when: target_k3s_version not in pre_k3s_ver.stdout - name: Query post-upgrade K3s version ansible.builtin.command: k3s --version @@ -57,8 +61,9 @@ that: - target_k3s_version in post_k3s_ver.stdout fail_msg: "Post-upgrade version does not match target {{ target_k3s_version }}" - success_msg: "{{ inventory_hostname }} successfully upgraded to {{ target_k3s_version }}" + success_msg: "{{ inventory_hostname }} is verified on {{ target_k3s_version }}" - name: Settle etcd cluster state ansible.builtin.pause: seconds: 10 + when: target_k3s_version not in pre_k3s_ver.stdout diff --git a/snarfcode_update.bundle b/snarfcode_update.bundle index 0e4b0fe..38b4709 100644 Binary files a/snarfcode_update.bundle and b/snarfcode_update.bundle differ