feat ✨: Add WoL status and interface mode support
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
Implemented new features to display Wake-on-LAN (WoL) status and supported modes for network interfaces.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user