This commit is contained in:
2025-10-24 10:59:51 +03:00
parent e84e26b393
commit 9396728ddd

View File

@@ -49,17 +49,16 @@
msg: msg:
- "Dev1 banner raw: {{ (dev1_banner.stdout | default('') | trim) | regex_replace('\\n',' ') }}" - "Dev1 banner raw: {{ (dev1_banner.stdout | default('') | trim) | regex_replace('\\n',' ') }}"
# Extract exactly "X.Y.Z rev NNNN" by dropping anything after the pipe - name: Dev1 | Strip trailing timestamp after pipe
- name: Dev1 | Extract 'X.Y.Z rev NNNN' by removing trailing timestamp
delegate_to: localhost delegate_to: localhost
set_fact: set_fact:
dev1_fw_clean: "{{ (dev1_banner.stdout | default('') | trim) | regex_replace('\\s*\\|.*$', '') }}" dev1_fw_base: "{{ (dev1_banner.stdout | default('') | trim) | regex_replace('\\s*\\|.*$', '') }}"
- name: Dev1 | Debug normalized fw string to be published - name: Dev1 | Convert '... rev NNNN' → '...-rNNNN'
delegate_to: localhost delegate_to: localhost
debug: set_fact:
msg: dev1_fw_clean: "{{ dev1_fw_base | regex_replace('\\s*[Rr][Ee][Vv]\\.??\\s*([0-9]+)\\s*$', '-r\\1') }}"
- "Dev1 fw_version (clean): {{ dev1_fw_clean }}"
# Build payload preview for Dev1 (so the next debug is defined) # Build payload preview for Dev1 (so the next debug is defined)
- name: Dev1 | Build payload preview string - name: Dev1 | Build payload preview string