Commit aeab9886 authored by Pavlos Daoglou's avatar Pavlos Daoglou

Added action for nagios plugins installation

parent a862da01
......@@ -6,3 +6,12 @@ iptables_rules:
input:
- { dport: "80", proto: "tcp", policy: "accept"}
- { dport: "443", proto: "tcp", policy: "accept"}
nagios_plugins:
- { name: nagios-plugins-tcp , repo: "" }
- { name: nagios-plugins-disk , repo: "" }
- { name: nagios-plugins-http , repo: "" }
- { name: nagios-plugins , repo: "" }
- { name: nagios-plugins-dummy , repo: "" }
- { name: nagios-plugins-procs , repo: "" }
- { name: nagios-plugins-ping , repo: "" }
\ No newline at end of file
---
- hosts: monitoring_engine
user: root
sudo: true
roles:
- { role: firewall, tags: firewall }
- { role: repos, tags: repos }
- { role: has_certificate, tags: certificate }
- { role: monitoring_engine, tags: monitoring_engine }
- { role: firewall, tags: firewall }
- { role: repos, tags: repos }
- { role: has_certificate, tags: certificate }
- { role: monitoring_engine, tags: monitoring_engine }
......@@ -2,11 +2,18 @@
- name: Install Nagios
yum: name=nagios state=latest enablerepo=nagios
- name: Install Apache
yum: name=httpd state=latest
- name: Install NCG and MSG conponents
yum: name={{ item.name }} state=latest enablerepo={{ item.repo }}
with_items: nagios_components
- name: Install Nagios plugins
yum: name={{ item.name }} state=latest enablerepo={{ item.repo }}
with_items: nagios_plugins
- name: Copy nagios.cfg file
template: src=nagios.cfg.j2
dest=/etc/nagios/nagios.cfg
......@@ -22,6 +29,9 @@
dest=/var/cache/msg/broker-cache-file/broker-list
owner=root group=root mode=0644
- name: Enable nagios on boot and start service
service: name=nagios state=started enabled=yes
- name: Enable nagios and httpd on boot and start service
service: name={{ item }} state=started enabled=yes
with_items:
- nagios
- httpd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment