ansible/roles/monit/tasks/main.yml

40 lines
881 B
YAML
Raw Normal View History

2020-08-04 23:57:58 +00:00
---
- name: Gather instance facts
setup:
- name: Update APT package cache
apt:
update_cache: "true"
cache_valid_time: "3600"
tags:
- monit-install
- name: Install monit
package:
name: "{{ packages }}"
state: present
vars:
packages:
- monit
tags:
- monit-install
- block:
2020-08-05 00:01:42 +00:00
- name: Setup monitrc
template:
src: monitrc
dest: "/etc/monit/monitrc"
owner: root
group: root
mode: 0644
tags:
- monit-config
2020-08-04 23:57:58 +00:00
- name: Setup filesystem monitoring
template:
src: filesystem
dest: "/etc/monit/conf.d/{{item.name}}"
owner: root
group: root
mode: 0644
loop:
2020-08-05 00:00:36 +00:00
"{{ monit_filesystems }}"
2020-08-04 23:57:58 +00:00
tags:
- monit-config
- monit-filesystems