--- - hosts: yum tasks: - name: Install NTP yum: name=ntp state=latest - name: Copy ntp.conf copy: src=ntp.conf dest=/etc/ntp.conf backup=yes - name: Restart NTP service: name=ntpd state=restarted - name: Enable NTP service: name=ntpd enabled=yes state=started