feat: adding 2.2.3-r9800 2040
This commit is contained in:
@@ -653,23 +653,6 @@
|
||||
when: nbq2_payload_obj is defined
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Init after-upgrade scheduling vars
|
||||
ansible.builtin.set_fact:
|
||||
au_attempt: 1
|
||||
au_max_attempts: 3
|
||||
# If a reboot was scheduled on the target, wait reboot_seconds + 300s (5m).
|
||||
# Because this task runs with delegate_to: localhost, read from hostvars.
|
||||
au_delay_sec: >-
|
||||
{{
|
||||
(
|
||||
(hostvars[inventory_hostname].reboot_seconds | default(0) | int)
|
||||
+ 300
|
||||
)
|
||||
if (hostvars[inventory_hostname].reboot_seconds is defined)
|
||||
else 300
|
||||
}}
|
||||
when: nbq2_payload_obj is defined
|
||||
delegate_to: localhost
|
||||
|
||||
# NEW: compute values that the payload will reference
|
||||
- name: Generate correlation ID and original emitted timestamp
|
||||
@@ -679,25 +662,11 @@
|
||||
when: nbq2_payload_obj is defined
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Build after-upgrade check payload (attempt 1)
|
||||
ansible.builtin.set_fact:
|
||||
afterupgrade_payload:
|
||||
task_name: "afterupgrade_check"
|
||||
inscope_device: "{{ ansible_hostname | default(inventory_hostname) }}"
|
||||
target_version: "{{ fw_banner_repr }}"
|
||||
attempt: "{{ au_attempt | default(1) }}"
|
||||
max_attempts: "{{ au_max_attempts | default(3) }}"
|
||||
current_delay_sec: "{{ au_delay_sec | default(300) }}"
|
||||
correlation_id: "{{ au_correlation_id }}"
|
||||
original_emitted_at: "{{ au_original_emitted_at }}"
|
||||
schema_version: 1
|
||||
when: nbq2_payload_obj is defined
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Build after-upgrade check payload (attempt 1)
|
||||
ansible.builtin.set_fact:
|
||||
au_attempt: 1
|
||||
au_delay_sec: 300
|
||||
au_delay_sec: "{{ au_delay_sec | default(300) }}"
|
||||
au_correlation_id: "{{ lookup('pipe', 'date +%s%N | sha1sum | cut -c1-12') }}"
|
||||
au_original_emitted_at: "{{ lookup('pipe', 'date -u +%FT%TZ') }}"
|
||||
afterupgrade_payload:
|
||||
@@ -719,6 +688,15 @@
|
||||
when: afterupgrade_payload is defined
|
||||
delegate_to: localhost
|
||||
|
||||
- name: DEBUG after-upgrade payload and timing
|
||||
delegate_to: localhost
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- "afterupgrade_payload={{ afterupgrade_payload | to_nice_json }}"
|
||||
- "au_delay_sec={{ au_delay_sec }}"
|
||||
- "reboot_seconds(host)={{ hostvars[inventory_hostname].reboot_seconds | default('undefined') }}"
|
||||
|
||||
|
||||
- name: Publish delayed after-upgrade check to holding exchange
|
||||
ansible.builtin.uri:
|
||||
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost | urlencode }}/{{ 'deviceconfig.delayed' | urlencode }}/publish"
|
||||
|
||||
Reference in New Issue
Block a user