summaryrefslogtreecommitdiffstats
path: root/roles/logind/tasks
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-09 23:20:14 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-10 00:38:48 +0200
commit31ab4af71809028695e747cc717dae0e45a21e8e (patch)
tree0a46b0bbab2ab58a91e29669a9f5519e817d551a /roles/logind/tasks
parent1cbb9df950175e698e1edc87953e8f4bfb22b88a (diff)
Extract logind lid configuration into it's own role
Diffstat (limited to 'roles/logind/tasks')
-rw-r--r--roles/logind/tasks/main.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/logind/tasks/main.yml b/roles/logind/tasks/main.yml
new file mode 100644
index 00000000..3b5aad5c
--- /dev/null
+++ b/roles/logind/tasks/main.yml
@@ -0,0 +1,17 @@
+---
+- 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 systemd-logind"
+ become: true
+ ansible.builtin.template:
+ src: "logind.conf.j2"
+ dest: "/etc/systemd/logind.conf.d/override.conf"
+ owner: "root"
+ group: "root"
+ mode: "0644"
+ notify: "Reload systemd-logind"