From 9802775b6642d4257b4b2cd9a4e27a4a86bf01d8 Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Mon, 18 Jan 2016 15:21:04 -0500 Subject: added chrony --- roles/chrony/tasks/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 roles/chrony/tasks/main.yml (limited to 'roles/chrony/tasks') 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 -- cgit v1.2.3