diff options
| author | Ahmed AbdelHalim <[email protected]> | 2026-07-03 11:00:17 +0200 |
|---|---|---|
| committer | Ahmed AbdelHalim <[email protected]> | 2026-07-03 11:00:17 +0200 |
| commit | 0bca6bd749c2f799074d648843aea576b7f506d8 (patch) | |
| tree | 9e36d5afa874fb50f05c9ce81ad7d5e475272103 /roles/ethtool/tasks/main.yml | |
| parent | e89dee079d3453b3965b0bed59233c19825704ee (diff) | |
Update ethtool to handle laptop lid suspend issues
When using WoL with laptops (ex Lenovo) closing the lid suspends the
laptop and breaks WoL, this is to allow configuring the lid behavior
Diffstat (limited to 'roles/ethtool/tasks/main.yml')
| -rw-r--r-- | roles/ethtool/tasks/main.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/ethtool/tasks/main.yml b/roles/ethtool/tasks/main.yml index 9d2dac60..d1832d0b 100644 --- a/roles/ethtool/tasks/main.yml +++ b/roles/ethtool/tasks/main.yml @@ -22,3 +22,18 @@ enabled: true state: "started" daemon_reload: true + +- name: "Ensure /etc/systemd/logind.conf.d exists" + become: true + ansible.builtin.file: + path: "/etc/systemd/logind.conf.d" + state: "directory" + mode: "0755" + +- name: "Configure lid switch on AC power" + become: true + ansible.builtin.template: + src: "logind.conf.j2" + dest: "/etc/systemd/logind.conf.d/wol.conf" + mode: "0644" + notify: "Reload systemd-logind" |
