This repository was archived by the owner on May 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +37
-32
lines changed Expand file tree Collapse file tree 5 files changed +37
-32
lines changed Original file line number Diff line number Diff line change 33
44httpd_port: 80
55ntpserver: 192.168.1.2
6+
7+ base_packages:
8+ - httpd
9+ - php
10+ - php-mysql
11+ - git
12+
13+ python_selinux_packages:
14+ - libselinux-python
15+ - libsemanage-python
16+
17+ nagios_packages:
18+ - nagios
19+ - nagios-plugins
20+ - nagios-plugins-nrpe
21+ - nagios-plugins-ping
22+ - nagios-plugins-ssh
23+ - nagios-plugins-http
24+ - nagios-plugins-mysql
25+ - nagios-devel
26+
27+ nagios_plugins_packages:
28+ - nagios-nrpe
29+ - nagios-plugins-swap
30+ - nagios-plugins-users
31+ - nagios-plugins-procs
32+ - nagios-plugins-load
33+ - nagios-plugins-disk
34+
35+ db_packages:
36+ - mysql-server
37+ - MySQL-python
Original file line number Diff line number Diff line change 33
44- name : Install http
55 yum :
6- name : " {{ item }}"
6+ name : " {{ base_packages }}"
77 state : present
8- with_items :
9- - httpd
10- - php
11- - php-mysql
12- - git
138
149- name : Configure SELinux to allow httpd to connect to remote database
1510 seboolean :
Original file line number Diff line number Diff line change 22# This role contains common plays that will run on all nodes.
33
44- name : Install python bindings for SE Linux
5- yum : name={{ item }} state=present
6- with_items :
7- - libselinux-python
8- - libsemanage-python
5+ yum : name={{ python_selinux_packages }} state=present
96
107- name : Create the repository for EPEL
118 copy : src=epel.repo dest=/etc/yum.repos.d/epel.repo
1411 copy : src=RPM-GPG-KEY-EPEL-6 dest=/etc/pki/rpm-gpg
1512
1613- name : install some useful nagios plugins
17- yum : name={{ item }} state=present
18- with_items :
19- - nagios-nrpe
20- - nagios-plugins-swap
21- - nagios-plugins-users
22- - nagios-plugins-procs
23- - nagios-plugins-load
24- - nagios-plugins-disk
14+ yum : name={{ nagios_plugins_packages }} state=present
2515
2616- name : Install ntp
2717 yum : name=ntp state=present
Original file line number Diff line number Diff line change 22# This role will install MySQL and create db user and give permissions.
33
44- name : Install Mysql package
5- yum : name={{ item }} state=present
6- with_items :
7- - mysql-server
8- - MySQL-python
5+ yum : name={{ db_packages }} state=present
96
107- name : Configure SELinux to start mysql on any port
118 seboolean : name=mysql_connect_any state=true persistent=yes
Original file line number Diff line number Diff line change 22# This will install nagios
33
44- name : install nagios
5- yum : pkg={{ item }} state=present
6- with_items :
7- - nagios
8- - nagios-plugins
9- - nagios-plugins-nrpe
10- - nagios-plugins-ping
11- - nagios-plugins-ssh
12- - nagios-plugins-http
13- - nagios-plugins-mysql
14- - nagios-devel
5+ yum : pkg={{ nagios_packages }} state=present
156 notify : restart httpd
167
178- name : create nagios config dir
You can’t perform that action at this time.
0 commit comments