xci: synchronize-time: Install the chrony package and drop Xenial reference 31/41631/4
authorMarkos Chandras <mchandras@suse.de>
Tue, 5 Sep 2017 14:12:41 +0000 (15:12 +0100)
committerMarkos Chandras <mchandras@suse.de>
Sun, 17 Sep 2017 21:42:51 +0000 (22:42 +0100)
The roles should pull all the packages they need so we need to install
the 'chrony' package everywhere and also drop the Xenial reference since
there is nothing Ubuntu specific here.

Change-Id: I51fb24573c0e884f8a96868e304b23140cc23b41
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/playbooks/roles/synchronize-time/tasks/main.yml
xci/xci-deploy.sh

index 985c151..cc73c44 100644 (file)
@@ -7,16 +7,17 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
-# TODO: this role needs to be adjusted for different distros
-- block:
-    - name: restart chrony
-      service:
-        name: chrony
-        state: restarted
-    - name: synchronize time
-      shell: "chronyc -a 'burst 4/4' && chronyc -a makestep"
-      register: chrony_got_time
-      until: chrony_got_time.rc == 0
-      retries: 5
-      delay: 5
-  when: ansible_distribution_release == "xenial"
+- name: install chrony
+  package:
+    name: "chrony"
+    state: latest
+- name: restart chrony
+  service:
+    name: chrony
+    state: restarted
+- name: synchronize time
+  shell: "chronyc -a 'burst 4/4' && chronyc -a makestep"
+  register: chrony_got_time
+  until: chrony_got_time.rc == 0
+  retries: 5
+  delay: 5
index 1a84fae..6a66134 100755 (executable)
@@ -74,7 +74,7 @@ case ${OS_FAMILY,,} in
     debian)
         export DIB_OS_RELEASE="${DIB_OS_RELEASE:-xenial}"
         export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-ubuntu-minimal}"
-        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl,chrony,iptables}"
+        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl,iptables}"
         export EXTRA_DIB_ELEMENTS="${EXTRA_DIB_ELEMENTS:-openssh-server}"
         ;;
     redhat)