aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/tasks/timesyncd.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/space_server/tasks/timesyncd.yml')
-rw-r--r--roles/space_server/tasks/timesyncd.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/space_server/tasks/timesyncd.yml b/roles/space_server/tasks/timesyncd.yml
new file mode 100644
index 0000000..cf964e3
--- /dev/null
+++ b/roles/space_server/tasks/timesyncd.yml
@@ -0,0 +1,15 @@
+---
+- name: Enable systemd-timesyncd
+ systemd:
+ name: systemd-timesyncd.service
+ enabled: yes
+ masked: no
+ state: started
+ when: "'container' not in ansible_env"
+- name: '- when in nspawn'
+ command: systemctl enable systemd-timesyncd.service
+ args:
+ creates: '/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service'
+ when: "'container' in ansible_env"
+
+# vim: set ts=2 sw=2 et: