2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-12 08:58:46 +01:00
Files
openhab-ansible/roles/raspberry/tasks/ntp.yml
Christian Schnidrig 3a665afb54 initial commit
2016-11-29 00:08:10 +01:00

29 lines
509 B
YAML

---
- name: update ntp.conf
lineinfile:
dest=/etc/ntp.conf
regexp="^server\s+.*debian.pool.ntp.org.*"
insertafter="^server\s.*"
state=absent
notify: restart ntp
tags:
- ntp
- ntpconfig
- name: update ntp.conf
lineinfile:
dest=/etc/ntp.conf
insertafter="# pool:"
line="server {{item}} iburst"
with_items: "{{ntp}}"
notify: restart ntp
tags:
- ntp
- ntpconfig
- name: Start the ntp service
service: name=ntp state=started enabled=true
tags: ntp