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