make sure all cloud instances have ntp installed, configured and running

This commit is contained in:
Seth Vidal 2012-12-05 06:19:23 +00:00
parent c51ce87a0f
commit e6a197a444
2 changed files with 22 additions and 0 deletions

10
files/common/step-tickers Normal file
View file

@ -0,0 +1,10 @@
# [clock.redhat.com]
66.187.233.4
# [time.nist.gov]
192.43.244.18
# [otc1.psu.edu]
128.118.25.5
# [clock.isc.org]
204.152.184.72
# [loopback]
127.127.1.0

View file

@ -18,9 +18,21 @@
action: yum state=installed pkg=ntpdate
tags:
- packages
- name: sync time - just once
action: command /usr/sbin/ntpdate -s -b 66.187.233.4
- name: ntp install
action: yum state=installed pkg=ntp
tags:
- packages
- name: put step-tickers in place
action: copy src=$files/common/step-tickers dest=/etc/ntp/step-tickers
- name: enable the service
action: service name=ntpd state=running enabled=true
- name: edit hostname to be instance name - prefix hostbase var if it exists
action: shell hostname ${hostbase}`curl -s http://169.254.169.254/latest/meta-data/instance-id`
tags: