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:
@@ -26,6 +26,12 @@
|
|||||||
- hostvars[inventory_hostname]['ansible_' + item].master is defined
|
- hostvars[inventory_hostname]['ansible_' + item].master is defined
|
||||||
- hostvars[inventory_hostname]['ansible_' + item].master == wol_detected_bridge
|
- 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
|
- name: Select final WoL interface
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
wol_final_interface: >-
|
wol_final_interface: >-
|
||||||
@@ -43,13 +49,6 @@
|
|||||||
Please set wol_interface explicitly.
|
Please set wol_interface explicitly.
|
||||||
when: wol_final_interface | default('') | length == 0
|
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
|
- name: Check WOL support on interface
|
||||||
ansible.builtin.command: ethtool {{ wol_final_interface }}
|
ansible.builtin.command: ethtool {{ wol_final_interface }}
|
||||||
register: wol_capabilities
|
register: wol_capabilities
|
||||||
|
|||||||
Reference in New Issue
Block a user