43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
---
|
|
- name: Gather instance facts
|
|
setup:
|
|
- block:
|
|
- name: Setup monitrc
|
|
template:
|
|
src: monitrc-dispatcher
|
|
dest: "/opt/monit/monitrc"
|
|
owner: root
|
|
group: root
|
|
mode: 0600
|
|
notify:
|
|
- restart monit containerized
|
|
tags:
|
|
- monit-config
|
|
- name: Setup filesystem monitoring
|
|
template:
|
|
src: filesystem
|
|
dest: "/opt/monit/conf.d/{{item.name}}"
|
|
owner: root
|
|
group: root
|
|
mode: 0600
|
|
loop:
|
|
"{{ monit_filesystems }}"
|
|
notify:
|
|
- restart monit containerized
|
|
tags:
|
|
- monit-config
|
|
- monit-filesystems
|
|
- name: Setup wireguard monitoring
|
|
template:
|
|
src: wireguard-dispatcher
|
|
dest: "/opt/monit/conf.d/wireguard"
|
|
owner: root
|
|
group: root
|
|
mode: 0600
|
|
when: monit_wireguard
|
|
notify:
|
|
- restart monit containerized
|
|
tags:
|
|
- monit-config
|
|
- monit-wireguard
|