--- # ntpd tasks - name: /etc/ntp.conf file tags: - ntpd template: > dest=/etc/ntp.conf group=root mode=0644 owner=root src=ntp.conf.j2 notify: - restart "ntp" - name: install "ntpdate" and "ntp" tags: - ntpd - packages apt: name: [ 'ntpdate', 'ntp', ] state: present - name: ensure service "ntp" is enabled and started tags: - ntpd - services service: > enabled=yes name=ntp state=started