---
# Validation can take up to 15s, so be patient
- name: openntpd | Copy ntpd.conf
  template:
    src: ntpd/ntpd.conf.j2
    dest: /etc/ntpd.conf
    owner: root
    group: root
    mode: '644'
    validate: /usr/sbin/ntpd -n -f %s

- name: openntpd | Start openntpd service on runlevel 'default'
  service:
    name: openntpd
    enabled: true
    state: started
    runlevel: default
