From e6a197a444b173e9eff2abeccb0a713c2a586d82 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Wed, 5 Dec 2012 06:19:23 +0000 Subject: [PATCH] make sure all cloud instances have ntp installed, configured and running --- files/common/step-tickers | 10 ++++++++++ tasks/cloud_setup_basic.yml | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 files/common/step-tickers diff --git a/files/common/step-tickers b/files/common/step-tickers new file mode 100644 index 0000000000..66b740b7e5 --- /dev/null +++ b/files/common/step-tickers @@ -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 diff --git a/tasks/cloud_setup_basic.yml b/tasks/cloud_setup_basic.yml index 5067cdb5d0..cc8dd83b60 100644 --- a/tasks/cloud_setup_basic.yml +++ b/tasks/cloud_setup_basic.yml @@ -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: