summaryrefslogtreecommitdiffstats
path: root/roles/common
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2023-04-25 11:00:12 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2023-04-25 11:00:12 +0200
commit3750838311f778b86f95cb0eda3fc7e05d2f3c50 (patch)
tree37bec604d0e9a5f69b0c6b7680f4cc330c701fce /roles/common
parentebaed7e16a567af847a5f639e4fc9cd6e55f3959 (diff)
downloadplaybooks-ansible-3750838311f778b86f95cb0eda3fc7e05d2f3c50.tar.gz
playbooks-ansible-3750838311f778b86f95cb0eda3fc7e05d2f3c50.tar.xz
playbooks-ansible-3750838311f778b86f95cb0eda3fc7e05d2f3c50.zip
Disable hibernation at system level on all machines
Diffstat (limited to 'roles/common')
-rw-r--r--roles/common/tasks/systemd.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/common/tasks/systemd.yml b/roles/common/tasks/systemd.yml
index 5574ea2..88ac111 100644
--- a/roles/common/tasks/systemd.yml
+++ b/roles/common/tasks/systemd.yml
@@ -22,3 +22,19 @@
group: root
mode: 0644
when: ansible_distribution == "Fedora"
+
+- name: Configuration systemd hibernation
+ ini_file:
+ path: /etc/systemd/logind.conf
+ section: Login
+ option: HandleHibernateKey
+ value: ignore
+ notify: reload systemd
+
+- name: Configuration systemd HibernateKeyIgnoreInhibited
+ ini_file:
+ path: /etc/systemd/logind.conf
+ section: Login
+ option: HibernateKeyIgnoreInhibited
+ value: yes
+ notify: reload systemd