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 88eb045e2c3a91e8da727b27b8c34dd095fc45cc..4b94ecd03221aa83dc10bc212fc38f93e8bb357b 100644 (file)
--- a/base.yml
+++ b/base.yml
     - .profile
     - .bashrc
     - .bash_logout
     - .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