fix: syntax
This commit is contained in:
@@ -79,14 +79,17 @@
|
||||
delegate_to: "{{ groups['opnsense_backup'][0] }}"
|
||||
delegate_facts: true
|
||||
run_once: true
|
||||
when: (hostvars[groups['opnsense_backup'][0]].firmware_current_version if hostvars[groups['opnsense_master'][0]].firmware_target_kind == 'version' else 'firmware_product_series']) == hostvars[groups['opnsense_master'][0]].firmware_target_value or
|
||||
when: >-
|
||||
(hostvars[groups['opnsense_backup'][0]].firmware_current_version
|
||||
if hostvars[groups['opnsense_master'][0]].firmware_target_kind == 'version'
|
||||
else hostvars[groups['opnsense_backup'][0]].firmware_product_series)
|
||||
== hostvars[groups['opnsense_master'][0]].firmware_target_value
|
||||
|
||||
- name: Skip node {{ firmware_action }}
|
||||
ansible.builtin.set_fact:
|
||||
skip_update: true
|
||||
firmware_status: "skipped"
|
||||
when: firmware_up_to_date or
|
||||
firmware_action != firmware_status
|
||||
when: firmware_up_to_date or firmware_action != firmware_status
|
||||
|
||||
- name: "Assert"
|
||||
ansible.builtin.assert:
|
||||
@@ -120,7 +123,6 @@
|
||||
Title: "OPNsense {{ firmware_action }} report"
|
||||
Priority: "default"
|
||||
Tags: "x"
|
||||
run_once: true
|
||||
when: ntfy_url is defined
|
||||
|
||||
- ansible.builtin.fail:
|
||||
@@ -165,7 +167,9 @@
|
||||
force_basic_auth: true
|
||||
validate_certs: false
|
||||
register: _update_running
|
||||
failed_when: _update_running.json.status != 'busy'
|
||||
until: _update_running.json.status == 'busy'
|
||||
retries: 2
|
||||
delay: 2
|
||||
|
||||
- name: Wait for node to reboot after the {{ firmware_action }}
|
||||
ansible.builtin.wait_for:
|
||||
@@ -235,7 +239,6 @@
|
||||
Title: "OPNsense {{ firmware_action }} failed on {{ inventory_hostname }}"
|
||||
Priority: "high"
|
||||
Tags: "x"
|
||||
run_once: true
|
||||
when: ntfy_url is defined
|
||||
|
||||
- ansible.builtin.fail:
|
||||
@@ -293,7 +296,9 @@
|
||||
force_basic_auth: true
|
||||
validate_certs: false
|
||||
register: _update_running
|
||||
failed_when: _update_running.json.status != 'busy'
|
||||
until: _update_running.json.status == 'busy'
|
||||
retries: 2
|
||||
delay: 2
|
||||
|
||||
- name: Wait for node to reboot after the {{ firmware_action }}
|
||||
ansible.builtin.wait_for:
|
||||
@@ -371,7 +376,6 @@
|
||||
Title: "OPNsense {{ firmware_action }} failed on {{ inventory_hostname }}"
|
||||
Priority: "high"
|
||||
Tags: "x"
|
||||
run_once: true
|
||||
when: ntfy_url is defined
|
||||
|
||||
- ansible.builtin.fail:
|
||||
|
||||
Reference in New Issue
Block a user