From fbe14f1a587e5af5b5eb7ecbdaaae1a037c84d51 Mon Sep 17 00:00:00 2001 From: pavel Date: Wed, 5 Nov 2025 19:31:21 +0200 Subject: [PATCH] 19:31 --- files/ansible-playbooks/update-indoor.yml | 24 +++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/files/ansible-playbooks/update-indoor.yml b/files/ansible-playbooks/update-indoor.yml index c3d6538..f8f5c4d 100644 --- a/files/ansible-playbooks/update-indoor.yml +++ b/files/ansible-playbooks/update-indoor.yml @@ -642,30 +642,26 @@ ansible.builtin.debug: 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 + # ====== INSERTED: two-step normalization preview (plain debug only) ====== + - name: Normalize firmux step1 - replace 'rev ' with 'r' delegate_to: localhost ansible.builtin.set_fact: - dev2_fw_norm_step1: "{{ (dev2_firmux.stdout | default('')) | trim | regex_replace('\\brev\\s+','r') }}" + _firmux_step1: "{{ (dev2_firmux.stdout | default('') | trim) | regex_replace('\\brev\\s+', 'r') }}" - - name: Debug normalization step 1 output - when: dev2_fw_norm_step1 is defined + - name: Debug firmux step1 result delegate_to: localhost ansible.builtin.debug: - msg: "step1={{ dev2_fw_norm_step1 }}" + msg: "firmux_step1={{ _firmux_step1 | default('') }}" - - name: Normalize DEV2 firmux (step 2): replace space → '-' - when: dev2_fw_norm_step1 is defined + - name: Normalize firmux step2 - replace spaces with dashes delegate_to: localhost ansible.builtin.set_fact: - dev2_fw_norm_step2: "{{ dev2_fw_norm_step1 | replace(' ', '-') }}" + _firmux_step2: "{{ (_firmux_step1 | default((dev2_firmux.stdout | default('') | trim))) | regex_replace('\\s+', '-') }}" - - name: Debug normalization step 2 output - when: dev2_fw_norm_step2 is defined + - name: Debug firmux step2 result delegate_to: localhost ansible.builtin.debug: - msg: "step2={{ dev2_fw_norm_step2 }}" + msg: "firmux_step2={{ _firmux_step2 | default('') }}" # ====== END INSERTED ====== # ===================== Early equality/substring check (same logic as checker) ===================== @@ -714,6 +710,7 @@ }} changed_when: false + # 3) evaluate (same equality OR substring, case-insensitive) - name: Evaluate version match using normalized equality or substring delegate_to: localhost ansible.builtin.set_fact: @@ -750,6 +747,7 @@ current_fw_core: "{{ banner_norm | default('') }}" 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) when: not (_blocked | default(false)) ansible.builtin.set_fact: