Update mikrotikbackup_clean.yml
This commit is contained in:
@@ -70,7 +70,6 @@
|
||||
_update_text: "{{ update_check.stdout[0] | replace('\r', '') }}"
|
||||
tags: [upgrade, never]
|
||||
|
||||
# ⬇️ Add this to see exactly what RouterOS returns before parsing
|
||||
- name: Debug raw update output
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ _update_text }}"
|
||||
@@ -116,7 +115,15 @@
|
||||
- name: Trigger package download and install
|
||||
community.routeros.command:
|
||||
commands: /system package update install
|
||||
register: upgrade_result
|
||||
vars:
|
||||
ansible_command_timeout: 60
|
||||
when: installed_version != latest_version
|
||||
ignore_errors: true
|
||||
tags: [upgrade, never]
|
||||
|
||||
- name: Wait before reconnecting after reboot
|
||||
ansible.builtin.pause:
|
||||
seconds: 30
|
||||
when: installed_version != latest_version
|
||||
tags: [upgrade, never]
|
||||
|
||||
@@ -124,12 +131,10 @@
|
||||
community.routeros.command:
|
||||
commands: /system resource print
|
||||
register: reboot_wait
|
||||
until: reboot_wait is not failed
|
||||
retries: 30
|
||||
until: reboot_wait is succeeded
|
||||
retries: 20
|
||||
delay: 15
|
||||
when:
|
||||
- installed_version != latest_version
|
||||
- upgrade_result is not failed
|
||||
when: installed_version != latest_version
|
||||
tags: [upgrade, never]
|
||||
|
||||
- name: Confirm upgraded version
|
||||
|
||||
Reference in New Issue
Block a user