Compare commits

..

2 Commits

Author SHA1 Message Date
fb14e6701b feat : Add WOL status display per interface
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 11s
This feature introduces a new section in the build process that includes displaying Wake-On-LAN (WOL) status for each network interface. This allows users to easily monitor and manage WOL capabilities on their devices.
2025-12-24 10:40:31 +01:00
b7f743021f refactor ♻️: Refactor task names and conditions for better clarity and functionality
This refactoring improves the readability and logic of task management by renaming variables and simplifying conditional statements.
2025-12-24 10:32:25 +01:00

View File

@@ -17,16 +17,16 @@
- network
when: ansible_facts.interfaces is not defined
- name: Display WOL status per interface
- name: Display interfaces
ansible.builtin.debug:
msg: >
{{ ansible_facts.interfaces }}
- name: Get interfaces starting with "en"
- name: Get interfaces starting with "en" or "eth"
ansible.builtin.set_fact:
en_interfaces: "{{ ansible_facts.interfaces | select('match', '^eth|^ens|^enp') | unique | list }}"
- name: Display WOL interface
- name: Display selected interfaces
ansible.builtin.debug:
msg: >
{{ en_interfaces }}
@@ -44,6 +44,22 @@
msg: >
{{ wol_capabilities_check.results | map(attribute='stdout_lines') | list }}
- name: Build WOL status per interface
ansible.builtin.set_fact:
wol_status: >-
{{
wol_status | default({}) |
combine({
item.item:
(item.stdout | regex_search('Wake-on:\\s*(\\S+)', '\\1') | default('Not supported'))
})
}}
loop: "{{ wol_check.results }}"
- name: Display WOL support status
ansible.builtin.debug:
var: wol_status
# # ============================================================
# # Map bridges to physical NICs using Ansible facts
# # ============================================================