2015-07-12 21:17:32 +02:00
|
|
|
---
|
2015-09-14 01:08:32 +02:00
|
|
|
# Configuring NTP for domain clients
|
2015-07-12 21:17:32 +02:00
|
|
|
|
2015-09-14 01:08:32 +02:00
|
|
|
- name: Installing NTP
|
|
|
|
apt:
|
|
|
|
name: ntp
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Configuring NTP
|
|
|
|
template:
|
|
|
|
src: ntp.conf
|
|
|
|
dest: /etc/ntp.conf
|
|
|
|
backup: yes
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2015-07-12 21:17:32 +02:00
|
|
|
register: cfg_ntp
|
|
|
|
|
2015-09-14 01:08:32 +02:00
|
|
|
- name: Configuring AppArmor for NTP
|
2015-08-20 04:34:13 +02:00
|
|
|
lineinfile:
|
|
|
|
dest: /etc/apparmor.d/usr.sbin.ntpd
|
2015-08-20 04:38:45 +02:00
|
|
|
regexp: "/run/samba/winbindd/pipe"
|
|
|
|
line: ' /run/samba/winbindd/pipe crw,'
|
2015-08-20 04:34:13 +02:00
|
|
|
insertafter: 'samba/ntp_signd/socket'
|
|
|
|
state: present
|
|
|
|
|
2015-09-14 01:08:32 +02:00
|
|
|
- name: Restarting NTP service
|
2015-09-14 07:38:14 +02:00
|
|
|
shell: service ntp restart
|
2019-11-18 22:49:41 +01:00
|
|
|
when: cfg_ntp is changed
|