roles_timesync/roles/timesync-enabled/tasks/timesync_busybox-ntp.yml

26 lines
403 B
YAML
Raw Normal View History

---
- name: Template ntp.conf
template:
src: etc/busybox-ntp.conf.j2
dest: /etc/ntp.conf
owner: root
group: root
mode: 0644
backup: yes
notify: Restart NTP
- name: Remove server from command line
replace:
path: /etc/conf.d/ntpd
regexp: '\s?-p\s*[^ "]+'
replace: ''
- name: Enable NTP daemon
service:
name: '{{ ntp_service_name }}'
enabled: True