1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/mosquitto/tasks/enable-or-disable.yml

15 lines
392 B
YAML

- name: Enable & (Re)Start 'mosquitto' systemd service, if mosquitto_enabled
systemd:
daemon_reload: yes
name: mosquitto
enabled: yes
state: restarted
when: mosquitto_enabled
- name: Disable & Stop 'mosquitto' systemd service, if not mosquitto_enabled
systemd:
daemon_reload: yes
name: mosquitto
enabled: no
state: stopped
when: not mosquitto_enabled