Support time synchronization on hosts
This change introduces functionality to synchronize
infra/kube nodes' clock with external NTP authority.
Configuring external time source is optional, however
default behaviour will be to setup NTP time source on
infra-node and sync kube-nodes clock with it.
It's also possible to setup custom time zone.
Change-Id: I725ce9a306da1977628b6c03d5ff10fca77fb3b0
Issue-ID: OOM-1710
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/ansible/roles/chrony/defaults/main.yml b/ansible/roles/chrony/defaults/main.yml
new file mode 100644
index 0000000..af433da
--- /dev/null
+++ b/ansible/roles/chrony/defaults/main.yml
@@ -0,0 +1,16 @@
+---
+timesync: {}
+chrony:
+ servers: "{{ timesync.servers | default([hostvars[groups.infrastructure[0]].cluster_ip]) }}" # chronyd's NTP servers
+ slewclock: "{{ timesync.slewclock | default(false) }}" # chronyd's makestep property
+ timezone: "{{ timesync.timezone | default('Universal') }}" # Timezone name according to tz database
+ makestep: '1 -1'
+ maxjitter: 10 # Max allowed jitter if using infra as time source as it may by unstable due to pretending stratum 1 time source
+ initstepslew: 30
+ conf:
+ RedHat:
+ config_file: /etc/chrony.conf
+ driftfile: /var/lib/chrony/drift
+ Debian:
+ config_file: /etc/chrony/chrony.conf
+ driftfile: /var/lib/chrony/chrony.drift