1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- name: "[OpenRC] Restart service: mosquitto (to deploy config changes)"
service:
name: mosquitto
state: restarted
when:
- ansible_service_mgr == "openrc"
listen: "Restart mosquitto"
- name: "[systemd] Restart service: mosquitto (to deploy config changes)"
systemd:
daemon_reload: yes
name: mosquitto
state: restarted
when:
- ansible_service_mgr == "systemd"
listen: "Restart mosquitto"