https://github.com/ishantanu/ansible-monit
Ansible role for monit
https://github.com/ishantanu/ansible-monit
ansible monit
Last synced: 8 months ago
JSON representation
Ansible role for monit
- Host: GitHub
- URL: https://github.com/ishantanu/ansible-monit
- Owner: ishantanu
- Created: 2017-12-20T05:56:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T14:19:27.000Z (over 7 years ago)
- Last Synced: 2025-07-10T13:29:40.799Z (12 months ago)
- Topics: ansible, monit
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible monit role
Ansible role for installing and configuring monit on servers.
# Directory structure
```
.
├── defaults
│ └── main.yml
├── files
│ └── check-monit.sh
├── handlers
│ └── main.yml
├── tasks
│ └── main.yml
├── templates
│ └── monitrc.j2
└── vars
└── main.yml
```
# Configurable variables (necesary to set them before trying out the role.)
```
mmonit_user:
mmonit_pass:
monit_username:
monit_password:
monit_notify_email:
```
# Commands to execute the role
1. Running the role based on tags:
**Tags Available**
```
monit_installed - Checks if monit is installed
monit_ver - Checks monit version
install_monit - Do a fresh monit install
configure_monit - Configure monit installation (main monitrc config)
```
Examples:
```
ansible-playbook -i hosts --tags "monit_installed,monit_ver" monit.yml
```
Note: Tags `monit_installed` and `monit_ver` needs to ran together as both are dependent on each other
```
ansible-playbook -i hosts --tags "monit_installed,monit_ver,install_monit" monit.yml
```
2. Running the complete playbook
```
ansible-playbook -i hosts monit.yml
```
Note the way tags are incrementally used to check the state on target host individually. The final command will run the complete playbook
3. That's it. Grab yourself a piece of cookie and enjoy automating.