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