Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
- include: debian/pkg.yml
- include_tasks: debian/pkg.yml
tags: monit_pkg
when: ansible_os_family == "Debian"

- include: redhat/pkg.yml
- include_tasks: redhat/pkg.yml
tags: monit_pkg
when: ansible_os_family == "RedHat"

- include: config.yml
- include_tasks: config.yml
tags: monit_config

- include: monitors.yml
- include_tasks: monitors.yml
tags: monit_monitors

- include_tasks: service.yml
tags: monit_service
7 changes: 7 additions & 0 deletions tasks/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: service - ensure running and enabled
service:
name: "{{ monit_service }}"
state: started
enabled: yes

3 changes: 2 additions & 1 deletion vars/debian.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
monit_service: monit
monitrc_conf: /etc/monit/monitrc
monit_includes: /etc/monit/conf.d
monit_includes: /etc/monit/conf.d
1 change: 1 addition & 0 deletions vars/redhat.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
monit_service: monit
monitrc_conf: /etc/monitrc
monit_includes: /etc/monit.d