From 3750838311f778b86f95cb0eda3fc7e05d2f3c50 Mon Sep 17 00:00:00 2001 From: Matthieu Saulnier Date: Tue, 25 Apr 2023 11:00:12 +0200 Subject: Disable hibernation at system level on all machines --- roles/common/tasks/systemd.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'roles/common') 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 -- cgit