--- - name: Install ntp daemon apt: name=ntp when: samba_role is defined and (samba_role == 'dc' or samba_role == 'rodc') tags: ntp - name: Install chrony apt: name=chrony tags: ntp - name: Deploy chrony configuration template: src=chrony.conf.j2 dest=/etc/chrony/chrony.conf notify: restart chrony tags: ntp - name: Set daemon names set_fact: ntp_service='ntp' tags: ntp - set_fact: chrony_service='chrony' tags: ntp