19:07
This commit is contained in:
@@ -642,6 +642,32 @@
|
|||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "DEV2 firmux={{ (dev2_firmux.stdout | default('')) | trim }}"
|
msg: "DEV2 firmux={{ (dev2_firmux.stdout | default('')) | trim }}"
|
||||||
|
|
||||||
|
# ====== INSERTED: two-step normalization preview (rev→r, then space→dash) ======
|
||||||
|
- name: Normalize DEV2 firmux (step 1): replace 'rev ' → 'r'
|
||||||
|
when: dev2_firmux is defined
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
dev2_fw_norm_step1: "{{ (dev2_firmux.stdout | default('')) | trim | regex_replace('\\brev\\s+','r') }}"
|
||||||
|
|
||||||
|
- name: Debug normalization step 1 output
|
||||||
|
when: dev2_fw_norm_step1 is defined
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "step1={{ dev2_fw_norm_step1 }}"
|
||||||
|
|
||||||
|
- name: Normalize DEV2 firmux (step 2): replace space → '-'
|
||||||
|
when: dev2_fw_norm_step1 is defined
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
dev2_fw_norm_step2: "{{ dev2_fw_norm_step1 | replace(' ', '-') }}"
|
||||||
|
|
||||||
|
- name: Debug normalization step 2 output
|
||||||
|
when: dev2_fw_norm_step2 is defined
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "step2={{ dev2_fw_norm_step2 }}"
|
||||||
|
# ====== END INSERTED ======
|
||||||
|
|
||||||
# ===================== Early equality/substring check (same logic as checker) =====================
|
# ===================== Early equality/substring check (same logic as checker) =====================
|
||||||
# 1) expected_norm from image_filename (prefer extracted X.Y.Z-rNNNN)
|
# 1) expected_norm from image_filename (prefer extracted X.Y.Z-rNNNN)
|
||||||
- name: Normalize expected target step one compute base string (from image_filename)
|
- name: Normalize expected target step one compute base string (from image_filename)
|
||||||
@@ -688,7 +714,6 @@
|
|||||||
}}
|
}}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
# 3) evaluate (same equality OR substring, case-insensitive)
|
|
||||||
- name: Evaluate version match using normalized equality or substring
|
- name: Evaluate version match using normalized equality or substring
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@@ -725,7 +750,6 @@
|
|||||||
current_fw_core: "{{ banner_norm | default('') }}"
|
current_fw_core: "{{ banner_norm | default('') }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
# If we are NOT blocked, still fill the legacy names so your later summary prints them
|
|
||||||
- name: Back-fill compare names for summary (no-op if already set)
|
- name: Back-fill compare names for summary (no-op if already set)
|
||||||
when: not (_blocked | default(false))
|
when: not (_blocked | default(false))
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
|||||||
Reference in New Issue
Block a user