From 201864be81bec774f4f01bb8be3f8f8fdee387e0 Mon Sep 17 00:00:00 2001 From: pavel Date: Thu, 30 Oct 2025 22:12:49 +0200 Subject: [PATCH] feat: adding 2.2.3-r9800 2212 --- .../afterupgrade_withcurl.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/files/ansible-playbooks/afterupgrade_withcurl.yml b/files/ansible-playbooks/afterupgrade_withcurl.yml index 885c8c6..4d62222 100644 --- a/files/ansible-playbooks/afterupgrade_withcurl.yml +++ b/files/ansible-playbooks/afterupgrade_withcurl.yml @@ -140,6 +140,32 @@ version_match: "{{ (target_version_effective | length > 0) and (target_version_effective in (banner_probe.stdout | default(''))) }}" + # ---- Read eth0 MAC (only after confirmed version match) ---- + - name: Read eth0 MAC address via SSH + when: nc_probe.rc == 0 and banner_probe.rc == 0 and (version_match | bool) + delegate_to: localhost + ansible.builtin.shell: | + set -e + USER="{{ ssh_user }}" + HOST="{{ ansible_host | default(inventory_hostname) }}" + sshpass -p '{{ ssh_pass }}' \ + ssh -o StrictHostKeyChecking=no -o PubkeyAuthentication=no -o ConnectTimeout={{ ssh_timeout }} \ + "${USER}@${HOST}" \ + "cat /sys/class/net/eth0/address | tr -d '\n'" + register: mac_probe + changed_when: false + ignore_errors: true + + - name: Set eth0_macaddress fact + when: mac_probe is defined and mac_probe.rc == 0 + ansible.builtin.set_fact: + eth0_macaddress: "{{ (mac_probe.stdout | default('') | trim) }}" + + - name: Debug eth0_macaddress + when: eth0_macaddress is defined + ansible.builtin.debug: + msg: "eth0_macaddress={{ eth0_macaddress }}" + # ---- Journaling paths ---- # Success: banner matches expected full target_version - name: Build success journal payload