summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-09-05 15:12:41 +0100
committerMarkos Chandras <mchandras@suse.de>2017-09-17 22:42:51 +0100
commit313364481b13da8b09242d7275c52192d3e3438e (patch)
treedafbdc4ba1b024459dcad3d4e6012e50a541575e /xci/playbooks/roles
parent725e250ad2d36697487df629002a7caa7114c6d3 (diff)
xci: synchronize-time: Install the chrony package and drop Xenial reference
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>
Diffstat (limited to 'xci/playbooks/roles')
-rw-r--r--xci/playbooks/roles/synchronize-time/tasks/main.yml27
1 files changed, 14 insertions, 13 deletions
diff --git a/xci/playbooks/roles/synchronize-time/tasks/main.yml b/xci/playbooks/roles/synchronize-time/tasks/main.yml
index 985c1515..cc73c447 100644
--- a/xci/playbooks/roles/synchronize-time/tasks/main.yml
+++ b/xci/playbooks/roles/synchronize-time/tasks/main.yml
@@ -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