configure timesyncd
authorRalf Jung <post@ralfj.de>
Thu, 10 May 2018 08:44:31 +0000 (10:44 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 10 May 2018 08:44:31 +0000 (10:44 +0200)
base.yml

index 88eb045..4b94ecd 100644 (file)
--- a/base.yml
+++ b/base.yml
     - .profile
     - .bashrc
     - .bash_logout
+  - name: configure systemd-timesyncd
+    copy:
+      dest: /etc/systemd/timesyncd.conf
+      content: |
+               # See timesyncd.conf(5) for details.
+               [Time]
+               NTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
+    register: timesyncd_conf
+  - name: restart systemd-timesyncd
+    when: timesyncd_conf.changed
+    service: name=systemd-timesyncd state=restarted enabled=yes