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] }}"