Change ntp-server role formatting

This commit is contained in:
Alexander Dietrich 2017-02-05 13:47:57 +01:00
parent 17468493cc
commit 9ff6b69b82
2 changed files with 18 additions and 9 deletions

View file

@ -1,3 +1,5 @@
--- ---
- name: restart ntpd - name: restart ntpd
service: name=ntp state=restarted service:
name: ntp
state: restarted

View file

@ -1,14 +1,21 @@
--- ---
- name: be sure ntp is installed - name: install ntpd
apt: name=ntp state=latest apt:
name: ntp
state: present
tags: ntp tags: ntp
- name: be sure ntp is configured - name: template ntp.conf
template: src=ntp.conf.j2 dest=/etc/ntp.conf template:
notify: src: ntp.conf.j2
- restart ntpd dest: /etc/ntp.conf
backup: yes
notify: restart ntpd
tags: ntp tags: ntp
- name: be sure ntpd is running and enabled - name: start and enable ntpd
service: name=ntp state=started enabled=yes service:
name: ntp
state: started
enabled: yes
tags: ntp tags: ntp