initial upload
This commit is contained in:
24
roles/ntp/tasks/main.yml
Normal file
24
roles/ntp/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Install NTP
|
||||
apt: pkg=ntp state=present
|
||||
|
||||
- name: Configure NTP
|
||||
template: src=ntp.conf.j2 dest=/etc/ntp.conf
|
||||
notify: Restart NTP
|
||||
|
||||
- name: Configure NTP keys
|
||||
template: src=ntp.keys.j2 dest=/etc/ntp.keys owner=ntp group=ntp mode=0400
|
||||
notify: Restart NTP
|
||||
|
||||
- name: Ensure NTP is running
|
||||
service: name=ntp state=started enabled=yes
|
||||
|
||||
- name: Configure firewall rules for NTP
|
||||
template:
|
||||
dest: /etc/firewall/rules-v4.d/21_ntp.sh
|
||||
src: etc_firewall_rules-v4.d_21_ntp.sh.j2
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
when: ntp_firewall
|
||||
notify: Restart firewall
|
||||
Reference in New Issue
Block a user