31 lines
602 B
YAML
31 lines
602 B
YAML
---
|
|
# Configuring NTP for domain clients
|
|
|
|
- name: Installing NTP
|
|
apt:
|
|
name: ntp
|
|
state: present
|
|
become: yes
|
|
|
|
- name: Configuring NTP
|
|
template:
|
|
src: ntp.conf
|
|
dest: /etc/ntp.conf
|
|
backup: yes
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
register: cfg_ntp
|
|
|
|
- name: Configuring AppArmor for NTP
|
|
lineinfile:
|
|
dest: /etc/apparmor.d/usr.sbin.ntpd
|
|
regexp: "/run/samba/winbindd/pipe"
|
|
line: ' /run/samba/winbindd/pipe crw,'
|
|
insertafter: 'samba/ntp_signd/socket'
|
|
state: present
|
|
|
|
- name: Restarting NTP service
|
|
shell: service ntp restart
|
|
when: cfg_ntp|changed
|