- name: install packages package: name: chrony state: latest - name: deploy chrony configuration when: ansible_facts['distribution'] == 'Debian' notify: restart chronyd copy: src: "{{ chrony_config }}" dest: /etc/chrony/chrony.conf owner: root group: root mode: '0644' - name: deploy chrony configuration when: ansible_facts['distribution'] == 'Fedora' notify: restart chronyd copy: src: "{{ chrony_config }}" dest: /etc/chrony.conf owner: root group: root mode: '0644' - name: make sure chronyd is enabled systemd: name: chronyd enabled: yes masked: no