From: Ralf Jung Date: Thu, 10 May 2018 08:44:31 +0000 (+0200) Subject: configure timesyncd X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/bea8c24ee7a473aef46ce452a8f1578487ac983e?ds=inline configure timesyncd --- diff --git a/base.yml b/base.yml index 88eb045..4b94ecd 100644 --- a/base.yml +++ b/base.yml @@ -35,3 +35,14 @@ - .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