browbeat/ansible/browbeat/ntp-sync.yml

21 lines
411 B
YAML

---
#
# Playbook to force ntp time sync
#
# Versions tested: Newton, Ocata, Pike
#
# Example:
#
# ansible-playbook -i hosts browbeat/ntp-sync.yml -e 'ntp_server=clock.walkabout.com'
#
- hosts: overcloud
remote_user: "{{ host_remote_user }}"
gather_facts: false
vars_files:
- ../install/group_vars/all.yml
tasks:
- name: Sync NTP Time
command: ntpdate -u {{ntp_server}}
become: true