--- # TODO: check for other distro, maybe we should first check if we have systemd, # and if so, we have to properly configure it. If we don't have systemd, # we have to install and configure ntpd - name: Remove NTP package as we use systemd apt: name: [ 'ntp' ] state: absent - name: Setup NTP server ini_file: path: /etc/systemd/timesyncd.conf section: Time option: NTP value: "{{ esmith.SystemName }}.{{ esmith.DomainName }}" notify: restart systemd-timesyncd - name: Setup Fallback NTP server ini_file: path: /etc/systemd/timesyncd.conf section: Time option: FallbackNTP value: pool.ntp.org notify: restart systemd-timesyncd