ansible-roles/ubuntu-deb-general/tasks/ntp.yml

15 lines
456 B
YAML

---
- name: Install the ntp server
apt: pkg=ntp state={{ pkg_state }}
tags: [ 'packages', 'ntp' ]
- name: Install the ntp configuration. Needed on Ubuntu Xenial to allow the nagios check
template: src=ntp.conf.j2 dest=/etc/ntp.conf owner=root group=root mode=0644
notify: Restart ntp server
tags: [ 'packages', 'ntp' ]
- name: Ensure that the ntp server is running
service: name=ntp state=started enabled=yes
tags: [ 'packages', 'ntp' ]