From 09f530b0ba699df647e7f20b1936edc700694e55 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Thu, 14 Jan 2021 17:15:12 +0100 Subject: fedora: systemd: configure sleep.conf and user.conf --- roles/fedora/tasks/systemd.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'roles/fedora/tasks/systemd.yml') diff --git a/roles/fedora/tasks/systemd.yml b/roles/fedora/tasks/systemd.yml index 5413266..9fb6221 100644 --- a/roles/fedora/tasks/systemd.yml +++ b/roles/fedora/tasks/systemd.yml @@ -23,6 +23,18 @@ state: "{{ (item.value is string)|ternary('present','absent') }}" with_dict: '{{ journald_conf }}' +- name: Configure sleep.conf + vars: + sleep_conf: '{{ sleep_conf_default|combine(sleep_conf_role) }}' + ini_file: + path: '/etc/systemd/sleep.conf' + no_extra_spaces: yes + section: "{{ item.key.split('.',1)[0] }}" + option: "{{ item.key.split('.',1)[1] }}" + value: "{{ (item.value is string)|ternary(item.value,omit) }}" + state: "{{ (item.value is string)|ternary('present','absent') }}" + with_dict: '{{ sleep_conf }}' + - name: Configure logind.conf vars: logind_conf: '{{ logind_conf_default|combine(logind_conf_role) }}' @@ -35,4 +47,16 @@ state: "{{ (item.value is string)|ternary('present','absent') }}" with_dict: '{{ logind_conf }}' +- name: Configure user.conf + vars: + user_conf: '{{ user_conf_default|combine(user_conf_role) }}' + ini_file: + path: '/etc/systemd/user.conf' + no_extra_spaces: yes + section: "{{ item.key.split('.',1)[0] }}" + option: "{{ item.key.split('.',1)[1] }}" + value: "{{ (item.value is string)|ternary(item.value,omit) }}" + state: "{{ (item.value is string)|ternary('present','absent') }}" + with_dict: '{{ user_conf }}' + # vim: set ts=2 sw=2 et: -- cgit v1.2.1