From 4ecc0d10f897fcde45c473400f547ac15db2d596 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 26 Dec 2025 07:30:06 +0100 Subject: [PATCH] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20debug=20tasks=20for?= =?UTF-8?q?=20en=5Finterfaces=20and=20wol=5Fstatus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces new debug tasks specifically for the `en_interfaces` and `wol_status` modules, enhancing the diagnostic capabilities of these functionalities. --- tasks/main.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5894369..483a295 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,11 +35,15 @@ | list }} -- name: Display selected interfaces +- name: Display debug selected interfaces ansible.builtin.debug: msg: > {{ en_interfaces }} +- name: Display var selected interfaces + ansible.builtin.debug: + var: en_interfaces + - name: Check WoL status with ethtool ansible.builtin.shell: "ethtool {{ item }} | grep 'Wake-on'" register: wol_status @@ -48,18 +52,15 @@ loop: "{{ en_interfaces }}" when: en_interfaces | length > 0 +- name: Display var wol_status + ansible.builtin.debug: + var: wol_status + + - name: Display WoL status ansible.builtin.debug: msg: "{{ item.item }}:\n{{ item.stdout | default('No output') }}" loop: "{{ wol_status.results }}" - -- name: Display WoL status summary - ansible.builtin.debug: - msg: > - Interface {{ item.item }}: - Supported={{ (item.stdout | regex_findall('^\\s*Supports Wake-on: (.+)', multiline=True) | first) | default('unknown') }}, - Current={{ (item.stdout | regex_findall('^\\s*Wake-on: (.+)', multiline=True) | first) | default('unknown') }} - loop: "{{ wol_status.results }}" when: item.stdout is defined