ssme-thesis/attachments/ansible/roles/ansible-sw-ntp/tasks/main.yml
2019-03-02 15:53:46 +01:00

16 lines
369 B
YAML

- name: install ntpdate
yum:
name: ntpdate
state: latest
- name: Set Prague timezone
command: timedatectl set-timezone Europe/Prague
- name: Sync time
command: ntpdate 1.cz.pool.ntp.org
- cron:
name: "NTP sync time"
minute: "0"
hour: "1"
job: "/usr/sbin/ntpdate -s -u 1.cz.pool.ntp.org > /dev/null 2>&1"
state: present