ansible/playbooks/wol_enable.yml

21 lines
463 B
YAML
Raw Normal View History

2023-09-18 16:18:30 +02:00
- hosts: omv
2023-09-18 16:16:59 +02:00
name: Enable WOL
2023-09-18 17:07:10 +02:00
become: true
2023-09-18 16:16:59 +02:00
tasks:
- name: Creating config
2023-09-18 17:08:42 +02:00
become: yes
2023-09-18 16:16:59 +02:00
ansible.builtin.copy:
2023-09-18 17:08:42 +02:00
2023-09-18 16:16:59 +02:00
dest: "/etc/systemd/system/wol.service"
content: |
[Unit]
Description=Enable Wake On Lan
[Service]
Type=oneshot
ExecStart = /usr/sbin/ethtool --change enp3s0 wol g
[Install]
WantedBy=basic.target
owner: root
mode: '0744'