Fix ntp role issues with included handlers.

This commit is contained in:
Markus 2016-04-05 10:33:55 +02:00
parent 3f4f47adfe
commit 75aa51d0bb
6 changed files with 5 additions and 23 deletions

View File

@ -1,5 +0,0 @@
---
- name: Restart ntp
service: name=ntp state=restarted
tags: ntp

View File

@ -1,5 +0,0 @@
---
- name: Restart ntp
service: name=ntpd state=restarted
tags: ntp

View File

@ -1,9 +1,7 @@
---
- name: Debian
include: Debian.yml
when: ansible_os_family == 'Debian'
- name: Restart ntp
service: name=ntp state=restarted
- name: FreeBSD
include: FreeBSD.yml
when: ansible_distribution == 'FreeBSD'
- name: Restart ntpd
service: name=ntpd state=restarted

View File

@ -2,13 +2,10 @@
- name: Install ntp
apt: name=ntp state=present
tags: ntp
- name: Configure ntp
template: src=ntp.conf.j2 dest=/etc/ntp.conf
notify: Restart ntp
tags: ntp
- name: Start the ntp service
service: name=ntp state=started enabled=yes
tags: ntp

View File

@ -4,9 +4,7 @@
- name: Configure ntp
template: src=ntp.conf.j2 dest=/etc/ntp.conf
notify: Restart ntp
tags: ntp
notify: Restart ntpd
- name: Start the ntp service
service: name=ntpd state=started enabled=yes
tags: ntp

View File

@ -1,5 +1,4 @@
---
# This playbook contains common plays that will be run on all nodes.
- name: Debian
include: Debian.yml