templier-ansible/roles/ntp/tasks/main.yml
Yohann D'ANELLO 57b83cb58e
Explicit permissions
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2021-03-18 00:28:19 +01:00

24 lines
427 B
YAML

---
- name: Queries package manager for ntp installation
package:
name: ntp
register: pkg_result
retries: 3
until: pkg_result is succeeded
notify: restart ntpd.service
- name: Deploy ntp configuration
template:
src: 'ntp.conf.j2'
dest: '/etc/ntp.conf'
owner: root
group: root
mode: 0644
notify: restart ntpd.service
- name: Enable ntp service
service:
name: ntpd
enabled: yes