task after the timeout fails because _upgrade_exec.rc doesn't exist. Fix by checking if the variabl
This commit is contained in:
@@ -60,7 +60,13 @@
|
|||||||
|
|
||||||
- name: Display upgrade command exit code
|
- name: Display upgrade command exit code
|
||||||
ansible.builtin.debug:
|
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
|
when: perform_upgrade | bool
|
||||||
|
|
||||||
- name: Check upgrade success from log file
|
- name: Check upgrade success from log file
|
||||||
|
|||||||
Reference in New Issue
Block a user