mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-07 17:54:48 +02:00
Added draft for lid-switch
This commit is contained in:
parent
a2955a34ab
commit
5dda19cdc5
6
roles/pc-lid-switch/handlers/main.yml
Normal file
6
roles/pc-lid-switch/handlers/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Restart systemd-logind
|
||||
become: yes
|
||||
systemd:
|
||||
name: systemd-logind
|
||||
state: restarted
|
9
roles/pc-lid-switch/tasks/main.yml
Normal file
9
roles/pc-lid-switch/tasks/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Set HandleLidSwitch to hibernate in /etc/systemd/logind.conf
|
||||
become: yes
|
||||
lineinfile:
|
||||
path: /etc/systemd/logind.conf
|
||||
regexp: '^#?HandleLidSwitch='
|
||||
line: 'HandleLidSwitch=hibernate'
|
||||
backup: yes
|
||||
notify: Restart systemd-logind
|
Loading…
x
Reference in New Issue
Block a user