---

- name: Check that ntpsec is installed
  urpmi: name=ntpsec state=installed no_recommends=yes

- name: Check that ntp is configured
  template: src={{item.src }} dest={{ item.dest }} owner=root group=root mode=0640 backup=yes
  with_items:
    - { src: 'templates/ntp.conf.j2', dest: '/etc/ntp.conf' }
    - { src: 'templates/step-tickers.j2', dest: '/etc/ntp/step-tickers' }
  notify:
    - restart ntpd

- name: Check that ntpd is running and enabled
  service: name=ntpd state=started enabled=yes
