From f2ead2ad473b6497bdde4bc23e93b68fa7a9b090 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 25 Jan 2026 08:57:07 +0100 Subject: [PATCH] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20task=20to=20install?= =?UTF-8?q?=20wakeonlan=20and=20send=20WOL=20packets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tasks/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 92960ea..9abd79c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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] }}"