]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Add support to configure chronyd instead of ntpd
authorDavid Galloway <dgallowa@redhat.com>
Tue, 2 Oct 2018 18:57:19 +0000 (14:57 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 2 Oct 2018 20:32:46 +0000 (16:32 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/tasks/ntp.yml
roles/testnode/templates/chrony.conf [new file with mode: 0644]

index e0cf84dcf77e2a268e4d7adcb1a008c0bce10734..aa6982b409e313838d237d2e44801c695ae899d4 100644 (file)
     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 (file)
index 0000000..749c8c7
--- /dev/null
@@ -0,0 +1,6 @@
+{% for server in ntp_servers %}
+server {{ server }} iburst
+{% endfor %}
+driftfile /var/lib/chrony/drift
+makestep 1.0 3
+rtcsync