]> arthur.barton.de Git - AnsibleRoles.git/blob - roles/ntpd/tasks/main.yml
ffcc4eda67dfb865276ea07d8fef899ea259b624
[AnsibleRoles.git] / roles / ntpd / tasks / main.yml
1 ---
2 # ntpd tasks
3
4 - name: /etc/ntp.conf file
5   tags:
6     - ntpd
7   template: >
8     dest=/etc/ntp.conf
9     group=root
10     mode=644
11     owner=root
12     src=ntp.conf
13   notify:
14     - restart "ntp"
15
16 - name: install "ntpdate" and "ntp"
17   tags:
18     - ntpd
19     - packages
20   apt: >
21     name={{ item }}
22     state=installed
23   with_items:
24     - ntpdate
25     - ntp
26
27 - name: ensure service "ntp" is enabled and running
28   tags:
29     - ntpd
30     - services
31   service: >
32     enabled=yes
33     name=ntp
34     state=running