summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/bootstrap-host/tasks/time.yml
diff options
context:
space:
mode:
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/tasks/time.yml')
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/time.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/time.yml b/xci/playbooks/roles/bootstrap-host/tasks/time.yml
index 4b3bf95a..9eca769d 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/time.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/time.yml
@@ -10,13 +10,16 @@
- name: install chrony
package:
name: "chrony"
- state: latest
+ state: present
- name: restart chrony
service:
name: "{{ (ansible_pkg_mgr == 'apt') | ternary('chrony', 'chronyd') }}"
state: restarted
- name: synchronize time
shell: "chronyc -a 'burst 4/4' && chronyc -a makestep"
+ args:
+ executable: /bin/bash
+ changed_when: True
register: chrony_got_time
until: chrony_got_time.rc == 0
retries: 5