Skip to content

Latest commit

 

History

History
executable file
·
76 lines (55 loc) · 1.94 KB

README.md

File metadata and controls

executable file
·
76 lines (55 loc) · 1.94 KB

M/Monit


Ansible role for configuring M/Monit.

Pre Requisites


  • An Ansible ready host.

Install


Install this role with ansible-galaxy.

$ ansible-galaxy install rajasoun.ansible_role_mmonit
$ ansible-vault decrypt ~/.ansible/roles/rajasoun.ansible_role_mmonit/files/license.yml

Running the Playbook


Place SSL Certificate & Key in directory /etc/certs/ssl/

  • ssl_certificate.crt and
  • ssl_certificate_key.key
$ ansible-playbook -i ~/.ansible/roles/rajasoun.ansible_role_mmonit/inventory ~/.ansible/roles/rajasoun.ansible_role_mmonit/local.yml

Test


Use Multipass for creating VM Locally

  1. Prepare Ansible Ready Host
$ git clone https://github.com/rajasoun/multipass-wrapper
$ cd multipass-wrapper
$ ./assist.bash multipass setup
$ ./assist.bash multipass status
$ ./assist.bash multipass shell
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ansible -y
  1. Copy SSL Certificates ssl_certificate.crt and ssl_certificate_key.key available in directort /etc/certs/ssl/ inside VM
sudo mkdir -p /etc/certs/ssl/
sudo touch /etc/certs/ssl/ssl_certificate.crt
sudo touch /etc/certs/ssl/ssl_certificate_key.key
sudo chmod 0440 /etc/certs/ssl/
  1. Run Ansible Playbook
$ ansible-galaxy install rajasoun.ansible_role_mmonit
$ ansible-vault decrypt ~/.ansible/roles/rajasoun.ansible_role_mmonit/files/license.yml
$ ansible-playbook -i ~/.ansible/roles/rajasoun.ansible_role_mmonit/inventory ~/.ansible/roles/rajasoun.ansible_role_mmonit/local.yml

Role Variables


* mmonit_server_ip - IP Address of the VM, mmonit is being configured

Login


MMonit will be available in port 80 and 443 with automatic redirect from 80 to 443

Url Username Password
http:// mmonit mmonit