From e531859ead91012f819f8fb31c85fab2236d7433 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 21 Dec 2025 18:49:25 +0100 Subject: [PATCH] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor=20deb?= =?UTF-8?q?ug=20tasks=20for=20WoL=20interface=20selection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed redundant debug tasks and added a new task specifically for selecting the WoL interface. --- tasks/main.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 07a5538..3b911fd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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