blob: 1cacce77fb660f9e7bf6496396d8f66185a45c04 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
---
- name: Configure homed.conf
vars:
homed_conf: '{{ homed_conf_default|combine(homed_conf_role) }}'
ini_file:
path: '/etc/systemd/homed.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: '{{ homed_conf }}'
when: use_homed
notify: restart homed
- name: Enable/disable systemd-homed
systemd:
name: systemd-homed.service
enabled: "{{ use_homed|ternary('yes','no') }}"
masked: no
state: "{{ use_homed|ternary('started','stopped') }}"
when: not chroot
- name: '- when in chroot'
command: "systemctl {{ use_homed|ternary('enable','disable') }} systemd-homed.service"
when: chroot
# vim: set ts=2 sw=2 et:
|