vn-ansible/roles/config-ntp/tasks/main.yaml

24 lines
828 B
YAML
Raw Normal View History

2023-10-23 11:46:57 +00:00
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Install and configure NTP
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# paso1
# install package ntpdate
- name: install package ntpdate
apt:
name: "{{ ntpdate_package }}"
state: present
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# paso2
# copy timesync file to crontab.hourly
2023-10-23 11:51:53 +00:00
- name: copy file timesync to /etc/cron.hourly/timesync
2023-10-23 11:46:57 +00:00
copy:
src: timesync
dest: "{{ timesync_path }}"
owner: root
group: root
mode: '0644'
2023-10-23 11:57:52 +00:00
# backup: yes # NO backups
2023-10-23 11:46:57 +00:00
notify: restart crontab hourly
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++