diff --git a/playbooks/install_morefine.yaml b/playbooks/install_morefine.yaml index b61269b..6917931 100644 --- a/playbooks/install_morefine.yaml +++ b/playbooks/install_morefine.yaml @@ -90,5 +90,26 @@ ansible.builtin.apt: name: element-desktop update_cache: yes - - \ No newline at end of file + - name: Creating a file with content + ansible.builtin.copy: + dest: "/etc/systemd/system/wol@.service" + content: | + [Unit] + Description=Wake-on-LAN for %i + Requires=network.target + After=network.target + + [Service] + ExecStart=/usr/sbin/ethtool -s %i wol g + Type=oneshot + + [Install] + WantedBy=multi-user.target + - name: Just force systemd to reread configs (2.4 and above) + ansible.builtin.systemd: + daemon_reload: true + - name: Enable wol@eno1 + ansible.builtin.systemd: + name: wol@eno1 + state: started + enabled: true