--- - name: setup ntpd block: - command: timedatectl set-ntp no - package: name: ntp state: present - service: name: ntpd enabled: yes state: started when: ntp_daemon_type == "ntpd" - name: setup chrony block: - command: timedatectl set-ntp no - package: name: chrony state: present - service: name: chronyd enabled: yes state: started when: ntp_daemon_type == "chronyd" - name: setup timesyncd block: - command: timedatectl set-ntp on when: ntp_daemon_type == "timesyncd"