From 9e9acff4c1ff835929934aeb99bc85916c2e2943 Mon Sep 17 00:00:00 2001 From: pavel Date: Fri, 24 Oct 2025 10:24:39 +0300 Subject: [PATCH] 1021 --- files/ansible-playbooks/sot-updater.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/ansible-playbooks/sot-updater.yml b/files/ansible-playbooks/sot-updater.yml index 7ae8b7f..5dc61a1 100644 --- a/files/ansible-playbooks/sot-updater.yml +++ b/files/ansible-playbooks/sot-updater.yml @@ -52,17 +52,17 @@ # ***** FIXED: Strictly extract ONLY "X.Y.Z rev NNNN" from the banner ***** # This grabs the first occurrence of ".. rev " # and ignores any trailing timestamp like " | 2025-09-25 07:06:10". - - name: Dev1 | Extract exact 'X.Y.Z rev NNNN' (no timestamp) + - name: Dev1 | Extract 'X.Y.Z rev NNNN' by removing trailing timestamp delegate_to: localhost set_fact: dev1_fw_clean: >- {{ (dev1_banner.stdout | default('') | trim) - | regex_search('(?i)[0-9]+\\.[0-9]+\\.[0-9]+\\s+rev\\s+[0-9]+') - | default('') + | regex_replace('\\s*\\|.*$', '') # drop " | 2025-09-25 ..." and anything after }} + - name: Dev1 | Debug normalized fw string to be published delegate_to: localhost debug: @@ -86,7 +86,7 @@ "inscope_device": (ansible_hostname | default(inventory_hostname)), "task_name": "custom_field_set", "task_add1": "indoor_fwver", - "task_result": indoor_fw_norm + "task_result": indoor_fw_norm # ← FIXED } | to_json), "payload_encoding": "string" } | to_json