26 lines
403 B
YAML
26 lines
403 B
YAML
|
---
|
||
|
- 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
|
||
|
|
||
|
|