diff options
-rw-r--r-- | xci/playbooks/roles/synchronize-time/tasks/main.yml | 27 | ||||
-rwxr-xr-x | xci/xci-deploy.sh | 2 |
2 files changed, 15 insertions, 14 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 diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 1a84faeb..6a661349 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -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) |