aboutsummaryrefslogtreecommitdiffstats
path: root/roles/fedora/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/fedora/tasks')
-rw-r--r--roles/fedora/tasks/homed.yml27
-rw-r--r--roles/fedora/tasks/main.yml2
2 files changed, 29 insertions, 0 deletions
diff --git a/roles/fedora/tasks/homed.yml b/roles/fedora/tasks/homed.yml
new file mode 100644
index 0000000..1cacce7
--- /dev/null
+++ b/roles/fedora/tasks/homed.yml
@@ -0,0 +1,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:
diff --git a/roles/fedora/tasks/main.yml b/roles/fedora/tasks/main.yml
index e3f69a3..e9fa40f 100644
--- a/roles/fedora/tasks/main.yml
+++ b/roles/fedora/tasks/main.yml
@@ -20,6 +20,8 @@
tags: networkd
- import_tasks: timesyncd.yml
tags: timesyncd
+- import_tasks: homed.yml
+ tags: homed
- import_tasks: sshd.yml
tags: sshd
- import_tasks: sudo.yml