summaryrefslogtreecommitdiffstats
path: root/roles/chrony/tasks/main.yml
diff options
context:
space:
mode:
authorMatt Woodson <mwoodson@gmail.com>2016-01-18 15:47:54 -0500
committerMatt Woodson <mwoodson@gmail.com>2016-01-18 15:47:54 -0500
commit6fe8100badf6be308f89a690646811af9891633e (patch)
treed8b22ed79c472edba4bbbf81bce20dbe9d4ee9f0 /roles/chrony/tasks/main.yml
parentee3aec770b6b1a2b0212b432a920e3d846e56044 (diff)
parenta1c9b13d81d8c94c7764524809f5419a5d3ff73d (diff)
downloadopenshift-6fe8100badf6be308f89a690646811af9891633e.tar.gz
openshift-6fe8100badf6be308f89a690646811af9891633e.tar.bz2
openshift-6fe8100badf6be308f89a690646811af9891633e.tar.xz
openshift-6fe8100badf6be308f89a690646811af9891633e.zip
Merge pull request #1218 from mwoodson/chrony
new role: chrony so that servers can use ntp
Diffstat (limited to 'roles/chrony/tasks/main.yml')
-rw-r--r--roles/chrony/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/chrony/tasks/main.yml b/roles/chrony/tasks/main.yml
new file mode 100644
index 000000000..fae6d8e4c
--- /dev/null
+++ b/roles/chrony/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: remove ntp package
+ yum:
+ name: ntp
+ state: absent
+
+- name: ensure chrony package is installed
+ yum:
+ name: chrony
+ state: installed
+
+- name: Install /etc/chrony.conf
+ template:
+ src: chrony.conf.j2
+ dest: /etc/chrony.conf
+ owner: root
+ group: root
+ mode: 0644
+ notify:
+ - Restart chronyd
+
+- name: enabled timedatectl set-ntp yes
+ timedatectl:
+ ntp: True
+
+- name:
+ service:
+ name: chronyd
+ state: started
+ enabled: yes