Signed-off-by: Abdelaziz Raji <abdelaziz.raji@gmail.com>
@@ -3,12 +3,8 @@
service: name=ntpd state=restarted enabled=yes
- name: sync clocks
- shell: ntpdc -np
+ command: ntpdc -np
register: ntp_clock
until: ntp_clock.stdout.find('*') > -1
retries: 10
- delay: 60
-
+ delay: 60
@@ -1,9 +1,13 @@
---
- name: deploy ntpd
- yum: name=ntp state=present
+ yum:
+ name: ntp
+ state: present
- name: deploy ntpdate
- yum: name=ntpdate state=present
+ name: ntpdate
# ntp server
- name: update ntp servers
@@ -16,4 +20,4 @@
backup: yes
notify:
- restart ntpd
- - sync clocks
+ - sync clocks
@@ -1,5 +1,4 @@
ntp_servers:
- 0.centos.pool.ntp.org
- 1.centos.pool.ntp.org
- - 2.centos.pool.ntp.org
+ - 2.centos.pool.ntp.org