add: skip backuo

This commit is contained in:
2026-06-19 13:59:28 +00:00
parent a30bbddbf5
commit 3d6511262e

View File

@@ -61,7 +61,15 @@
total_vips: "{{ _vip_status.json.rowCount }}" total_vips: "{{ _vip_status.json.rowCount }}"
mismatched_vips: "{{ _vip_status.json.rows | rejectattr('status', 'equalto', main_role) | list | length }}" mismatched_vips: "{{ _vip_status.json.rows | rejectattr('status', 'equalto', main_role) | list | length }}"
in_maintenance: "{{ _vip_status.json.carp.maintenancemode }}" in_maintenance: "{{ _vip_status.json.carp.maintenancemode }}"
update_result: "{{ 'pending' if _firmware_status.json.status == 'update' else 'skipped' }}" # update_result: "{{ 'pending' if _firmware_status.json.status == 'update' else 'skipped' }}"
- name: Skip backup update
ansible.builtin.set_fact:
skip_update: true
delegate_to: "{{ groups['opnsense_backup'][0] }}"
delegate_facts: true
run_once: true
when: hostvars[groups['opnsense_backup'][0]].firmware_current_version == hostvars[groups['opnsense_master'][0]].firmware_new_version
- name: "Assert" - name: "Assert"
ansible.builtin.assert: ansible.builtin.assert:
@@ -150,23 +158,10 @@
force_basic_auth: true force_basic_auth: true
validate_certs: false validate_certs: false
register: _update_running register: _update_running
until: _update_running.json.status != 'running' until: _update_running.json.status != 'busy'
retries: 300 retries: 300
delay: 15 delay: 15
# # Reboot is a separate explicit step — update does NOT auto-reboot
# - name: Reboot node
# ansible.builtin.uri:
# url: "https://{{ opnsense_host }}/api/core/firmware/reboot"
# method: POST
# user: "{{ opnsense_api_key }}"
# password: "{{ opnsense_api_secret }}"
# force_basic_auth: true
# validate_certs: false
# body_format: json
# body: {}
# ignore_errors: true # Node drops the connection immediately
# - name: Wait for node to go offline # - name: Wait for node to go offline
# ansible.builtin.wait_for: # ansible.builtin.wait_for:
# host: "{{ ansible_host }}" # host: "{{ ansible_host }}"