Add handler for monit restart on config changes

This commit is contained in:
KemoNine 2020-08-05 00:11:17 +00:00
parent 11979a8a65
commit 05586b59a5
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,9 @@
---
- name: restart monit
service:
name: "monit"
state: "{{ item }}"
loop:
- stopped
- started
listen: "reconfigure monit"

View File

@ -24,6 +24,8 @@
owner: root
group: root
mode: 0644
notify:
- reconfigure wireguard
tags:
- monit-config
- name: Setup filesystem monitoring
@ -35,6 +37,8 @@
mode: 0644
loop:
"{{ monit_filesystems }}"
notify:
- reconfigure wireguard
tags:
- monit-config
- monit-filesystems
@ -45,6 +49,8 @@
owner: root
group: root
mode: 0644
notify:
- reconfigure wireguard
tags:
- monit-config
- monit-fim
@ -55,3 +61,5 @@
permanent: yes
state: enabled
immediate: yes
tags:
- monit-config