NTP client/server, prepare slapd
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
27
roles/ntp-server/tasks/main.yml
Normal file
27
roles/ntp-server/tasks/main.yml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Install NTP
|
||||
apt:
|
||||
update_cache: true
|
||||
name: ntp
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Configure NTP daemon
|
||||
lineinfile:
|
||||
path: /etc/default/ntp
|
||||
regexp: '^NTPD_OPTS'
|
||||
line: NTPD_OPTS='-g -x'
|
||||
check_mode: no
|
||||
|
||||
- name: Configure NTP
|
||||
template:
|
||||
src: ntp.conf.j2
|
||||
dest: /etc/ntp.conf
|
||||
mode: 0644
|
||||
|
||||
- name: Start ntp service
|
||||
systemd:
|
||||
name: ntp
|
||||
enabled: true
|
||||
state: started
|
Reference in New Issue
Block a user