feat : Add task to install wakeonlan and send WOL packets
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 9s

This commit introduces a new feature that includes adding a task to install the `wakeonlan` package and sending Wake-on-LAN (WOL) packets. This allows for remote control of devices by waking them up from a powered-off state.
This commit is contained in:
2026-01-25 08:57:07 +01:00
parent af4c561b3d
commit f2ead2ad47

View File

@@ -4,7 +4,9 @@
# ============================================================
- name: Install required packages
ansible.builtin.apt:
name: ethtool
name:
- ethtool
- wakeonlan
state: present
update_cache: true
@@ -128,6 +130,10 @@
ansible.builtin.pause:
seconds: 2
- name: Send WOL packet via shell
ansible.builtin.shell: wakeonlan {{ wol_mac_addresses[0] }}
delegate_to: localhost
- name: Send Wake-on-LAN packet from localhost
community.general.wakeonlan:
mac: "{{ wol_mac_addresses[0] }}"