feat: adding 2.2.3-r9800 2212
This commit is contained in:
@@ -140,6 +140,32 @@
|
|||||||
version_match: "{{ (target_version_effective | length > 0) and (target_version_effective in (banner_probe.stdout | default(''))) }}"
|
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 ----
|
# ---- Journaling paths ----
|
||||||
# Success: banner matches expected full target_version
|
# Success: banner matches expected full target_version
|
||||||
- name: Build success journal payload
|
- name: Build success journal payload
|
||||||
|
|||||||
Reference in New Issue
Block a user