mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
22 lines
580 B
YAML
22 lines
580 B
YAML
#- name: Enable 'monit' service (chkconfig monit on)
|
|
# command: chkconfig monit on
|
|
# when: is_debian and ansible_local.local_facts.os_ver == "debian-8"
|
|
|
|
#- name: Restart monit service
|
|
# command: service monit restart
|
|
|
|
- name: Enable & (Re)Start 'monit' systemd service, if monit_enabled
|
|
systemd:
|
|
daemon_reload: yes
|
|
name: monit
|
|
enabled: yes
|
|
state: restarted
|
|
when: monit_enabled | bool
|
|
|
|
- name: Disable & Stop 'monit' service, if not monit_enabled
|
|
systemd:
|
|
daemon_reload: yes
|
|
name: monit
|
|
enabled: no
|
|
state: stopped
|
|
when: not monit_enabled
|