task after the timeout fails because _upgrade_exec.rc doesn't exist. Fix by checking if the variabl

This commit is contained in:
2026-04-29 12:27:30 -07:00
parent d35505a7d1
commit 1737fd6535

View File

@@ -60,7 +60,13 @@
- name: Display upgrade command exit code
ansible.builtin.debug:
msg: "Upgrade command exit code: {{ _upgrade_exec.rc }}"
msg: "Upgrade command exit code: {{ _upgrade_exec.rc | default('TIMEOUT - upgrade may still be running') }}"
when: perform_upgrade | bool
- name: Check upgrade success from log file
ansible.builtin.raw: |
grep -q "__RC=0" /conf/upgrade_log.txt && echo "SUCCESS" || echo "FAILED"
register: _upgrade_verify
when: perform_upgrade | bool
- name: Check upgrade success from log file