--- - name: Installazione ntp apt: name=ntp state=present sudo: yes - name: Configurazione ntp template: src=ntp.conf dest=/etc/ntp.conf backup=yes owner=root group=root mode=0644 sudo: yes register: cfg_ntp - name: Permetto a NTP di utilizzare informazioni da winbind 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 sudo: yes - name: Riavvio ntp service: name=ntp state=restarted sudo: yes when: cfg_ntp|changed