timesync_ntp.yml 317 B

1234567891011121314151617181920212223
  1. - name: Install ntp daemon
  2. package:
  3. name: ntp
  4. state: latest
  5. - name: Template ntp.conf
  6. template:
  7. src: etc/ntp.conf.j2
  8. dest: /etc/ntp.conf
  9. owner: root
  10. group: root
  11. mode: 0644
  12. backup: yes
  13. notify: Restart NTP
  14. - name: Enable NTP daemon
  15. service:
  16. name: ntp
  17. enabled: True