aboutsummaryrefslogblamecommitdiffstats
path: root/roles/fedora/tasks/systemd.yml
blob: a2b9e4b16637aed8e09c28070442be14993eab79 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

                                     

                                                                         









                                                           

                                                                            









                                                           

                                                                      









                                                           
---
- name: Configure systemd system.conf
  vars:
    systemd_conf: '{{ systemd_conf_default|combine(systemd_conf_role) }}'
  ini_file:
    path: '/etc/systemd/system.conf'
    no_extra_spaces: yes
    section: "{{ item.key.split('.',1)[0] }}"
    option:  "{{ item.key.split('.',1)[1] }}"
    value:   "{{ item.value|ternary(item.value,omit) }}"
    state:   "{{ item.value|ternary('present','absent') }}"
  with_dict: '{{ systemd_conf }}'

- name: Configure journald.conf
  vars:
    journald_conf: '{{ journald_conf_default|combine(journald_conf_role) }}'
  ini_file:
    path: '/etc/systemd/journald.conf'
    no_extra_spaces: yes
    section: "{{ item.key.split('.',1)[0] }}"
    option:  "{{ item.key.split('.',1)[1] }}"
    value:   "{{ item.value|ternary(item.value,omit) }}"
    state:   "{{ item.value|ternary('present','absent') }}"
  with_dict: '{{ journald_conf }}'

- name: Configure logind.conf
  vars:
    logind_conf: '{{ logind_conf_default|combine(logind_conf_role) }}'
  ini_file:
    path: '/etc/systemd/logind.conf'
    no_extra_spaces: yes
    section: "{{ item.key.split('.',1)[0] }}"
    option:  "{{ item.key.split('.',1)[1] }}"
    value:   "{{ item.value|ternary(item.value,omit) }}"
    state:   "{{ item.value|ternary('present','absent') }}"
  with_dict: '{{ logind_conf }}'

# vim: set ts=2 sw=2 et: