--- # tasks file for zen_ntp - name: install ntp if not present package: name : ntp state : present - name: deploy {{ ntp_conf_file }} template: src: templates/ntp_conf.j2 dest: "{{ ntp_conf_file }}" mode: 0644 owner: root group: root notify: restart ntpd - name: enable/start ntpd service: name: ntpd enabled: yes state: started when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"