From a26cb5d0cfe5819496c772315a7c077d9a6c4e2a Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 26 Dec 2025 08:47:13 +0100 Subject: [PATCH] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20WoL=20status=20and=20?= =?UTF-8?q?interface=20mode=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented new features to display Wake-on-LAN (WoL) status and supported modes for network interfaces. --- tasks/main.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 011d5e7..ddd5367 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -53,11 +53,22 @@ loop: "{{ en_interfaces }}" when: en_interfaces | length > 0 -- name: Display wol_enabled values for all items +- name: Display WoL status ansible.builtin.debug: - msg: "{{ item.stdout }}" + msg: "Interface {{ item.item }} WoL status: {{ item.stdout }}" loop: "{{ wol_enabled.results }}" +- name: Check supported Wake-on-LAN modes + ansible.builtin.shell: "ethtool {{ item }} | grep 'Supports Wake-on' | tail -1 | awk '{print $3}'" + loop: "{{ interfaces }}" + register: wol_supported + changed_when: false + +- name: Display supported WoL modes + ansible.builtin.debug: + msg: "Interface {{ item.item }} supports WoL modes: {{ item.stdout }}" + loop: "{{ wol_supported.results }}" + - name: Check WoL status with ethtool