Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Commit 7085f05

Browse files
author
speedlight
committed
yum deprectation warnings for lamp-haproxy playbook
1 parent bf3473c commit 7085f05

File tree

5 files changed

+37
-32
lines changed

5 files changed

+37
-32
lines changed

lamp_haproxy/group_vars/all

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,35 @@
33

44
httpd_port: 80
55
ntpserver: 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

lamp_haproxy/roles/base-apache/tasks/main.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
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:

lamp_haproxy/roles/common/tasks/main.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
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
@@ -14,14 +11,7 @@
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

lamp_haproxy/roles/db/tasks/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
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

lamp_haproxy/roles/nagios/tasks/main.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
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

0 commit comments

Comments
 (0)