refactor ♻️: Refactor debug tasks for WoL interface selection

Removed redundant debug tasks and added a new task specifically for selecting the WoL interface.
This commit is contained in:
2025-12-21 18:49:25 +01:00
parent ae7ed6a894
commit e531859ead

View File

@@ -26,6 +26,12 @@
- hostvars[inventory_hostname]['ansible_' + item].master is defined
- hostvars[inventory_hostname]['ansible_' + item].master == wol_detected_bridge
- name: Debug WoL interface selection
ansible.builtin.debug:
msg:
- "Detected interface: {{ wol_detected_interface }}"
- "Detected physical NIC: {{ wol_detected_phy }}"
- name: Select final WoL interface
ansible.builtin.set_fact:
wol_final_interface: >-
@@ -43,13 +49,6 @@
Please set wol_interface explicitly.
when: wol_final_interface | default('') | length == 0
- name: Debug WoL interface selection
ansible.builtin.debug:
msg:
- "Detected bridge: {{ wol_detected_bridge }}"
- "Detected physical NIC: {{ wol_detected_phy }}"
- "Final WoL interface: {{ wol_final_interface }}"
- name: Check WOL support on interface
ansible.builtin.command: ethtool {{ wol_final_interface }}
register: wol_capabilities