summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-10 14:20:06 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-10 14:20:06 +0300
commite0ca52a81f76c2e7dce3d6fe05c1ca184ace3899 (patch)
treefbcb771d6a1dc249aa05eed5497ab9de41c72d30
parent067ee8bc4e65bb0a4ebcb359d7398cd47801922c (diff)
downloadansibleness-e0ca52a81f76c2e7dce3d6fe05c1ca184ace3899.tar.gz
x220: don't suspend on laptop lid close
Sponsored-by: author
-rw-r--r--ansible/x220.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/ansible/x220.yml b/ansible/x220.yml
index 7899f59..7bcd10b 100644
--- a/ansible/x220.yml
+++ b/ansible/x220.yml
@@ -7,6 +7,19 @@
- role: unix_users
- role: thinkpad
- role: puomi
+
+ tasks:
+ - lineinfile:
+ path: /etc/systemd/logind.conf
+ regexp: HandleLidSwitch=
+ line: HandleLidSwitch=ignore
+ - lineinfile:
+ path: /etc/systemd/logind.conf
+ regexp: HandleLidSwitchExternalPower=
+ line: HandleLidSwitchExternalPower=ignore
+ - systemd:
+ name: systemd-logind
+ state: restarted
vars:
ansible_python_interpreter: /usr/bin/python3