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