diff --git a/roles/ntp/handlers/Debian.yml b/roles/ntp/handlers/Debian.yml deleted file mode 100644 index 4b0629e..0000000 --- a/roles/ntp/handlers/Debian.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- name: Restart ntp - service: name=ntp state=restarted - tags: ntp diff --git a/roles/ntp/handlers/FreeBSD.yml b/roles/ntp/handlers/FreeBSD.yml deleted file mode 100644 index 0a437dd..0000000 --- a/roles/ntp/handlers/FreeBSD.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- name: Restart ntp - service: name=ntpd state=restarted - tags: ntp diff --git a/roles/ntp/handlers/main.yml b/roles/ntp/handlers/main.yml index ae3bb58..b4bf1ca 100644 --- a/roles/ntp/handlers/main.yml +++ b/roles/ntp/handlers/main.yml @@ -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 diff --git a/roles/ntp/tasks/Debian.yml b/roles/ntp/tasks/Debian.yml index 9850550..b113021 100644 --- a/roles/ntp/tasks/Debian.yml +++ b/roles/ntp/tasks/Debian.yml @@ -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 diff --git a/roles/ntp/tasks/FreeBSD.yml b/roles/ntp/tasks/FreeBSD.yml index 6b0652b..da2f02f 100644 --- a/roles/ntp/tasks/FreeBSD.yml +++ b/roles/ntp/tasks/FreeBSD.yml @@ -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 diff --git a/roles/ntp/tasks/main.yml b/roles/ntp/tasks/main.yml index b87264d..ae3bb58 100644 --- a/roles/ntp/tasks/main.yml +++ b/roles/ntp/tasks/main.yml @@ -1,5 +1,4 @@ --- -# This playbook contains common plays that will be run on all nodes. - name: Debian include: Debian.yml