2021-01-29 00:08:39 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Queries package manager for ntp installation
|
|
|
|
package:
|
|
|
|
name: ntp
|
|
|
|
register: pkg_result
|
|
|
|
retries: 3
|
|
|
|
until: pkg_result is succeeded
|
|
|
|
notify: restart ntpd.service
|
|
|
|
|
|
|
|
- name: Deploy ntp configuration
|
|
|
|
template:
|
|
|
|
src: 'ntp.conf.j2'
|
|
|
|
dest: '/etc/ntp.conf'
|
2021-03-17 23:25:44 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2021-01-29 00:08:39 +00:00
|
|
|
notify: restart ntpd.service
|
|
|
|
|
|
|
|
- name: Enable ntp service
|
|
|
|
service:
|
|
|
|
name: ntpd
|
|
|
|
enabled: yes
|