From: David Galloway Date: Tue, 2 Oct 2018 18:57:19 +0000 (-0400) Subject: testnode: Add support to configure chronyd instead of ntpd X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=05cd9e7fb2aedf0549bd1ba9d21e612c0548f278;p=ceph-cm-ansible.git testnode: Add support to configure chronyd instead of ntpd Signed-off-by: David Galloway --- diff --git a/roles/testnode/tasks/ntp.yml b/roles/testnode/tasks/ntp.yml index e0cf84d..aa6982b 100644 --- a/roles/testnode/tasks/ntp.yml +++ b/roles/testnode/tasks/ntp.yml @@ -34,6 +34,18 @@ mode: 0644 notify: - restart ntp + when: ntp_service_name == "ntp" or ntp_service_name == "ntpd" + +- name: Create the chrony.conf file + template: + src: chrony.conf + dest: /etc/chrony.conf + owner: root + group: root + mode: 0644 + notify: + - restart ntp + when: ntp_service_name == "chronyd" - name: Make sure ntpd is running. service: diff --git a/roles/testnode/templates/chrony.conf b/roles/testnode/templates/chrony.conf new file mode 100644 index 0000000..749c8c7 --- /dev/null +++ b/roles/testnode/templates/chrony.conf @@ -0,0 +1,6 @@ +{% for server in ntp_servers %} +server {{ server }} iburst +{% endfor %} +driftfile /var/lib/chrony/drift +makestep 1.0 3 +rtcsync