add restart handler

This commit is contained in:
Robert Kaussow 2017-12-17 13:40:34 +01:00
parent b0eacff9d0
commit 4a7c35137a
2 changed files with 13 additions and 0 deletions

View File

@ -1 +1,8 @@
---
- name: Restart mosquitto service
systemd:
state: restarted
daemon_reload: yes
name: mosquitto
listen:
- "mosquitto_restart"

View File

@ -35,6 +35,8 @@
owner: root
group: root
mode: 0644
notify:
- mosquitto_restart
- name: Copy passwd files
template:
@ -46,6 +48,8 @@
- name: Hash passwd file
shell: "mosquitto_passwd -U {{ mosquitto_passwd_file }}"
notify:
- mosquitto_restart
- name: Copy systemd unit files
template:
@ -54,6 +58,8 @@
owner: root
group: root
mode: 0644
notify:
- mosquitto_restart
- name: Enable systemd service
systemd: