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

package manager deprecation warnings #246

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions jboss-standalone/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ wait_for_port: 22

# This user name will be set by Tower, when run through Tower
tower_user_name: admin

java_packages:
- unzip
- java-1.7.0-openjdk
- libselinux-python
- libsemanage-python
7 changes: 1 addition & 6 deletions jboss-standalone/roles/jboss-standalone/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
---
- name: Install Java 1.7 and some basic dependencies
yum:
name: "{{ item }}"
name: "{{ java_packages }}"
state: present
with_items:
- unzip
- java-1.7.0-openjdk
- libselinux-python
- libsemanage-python

- name: Download JBoss from jboss.org
get_url:
Expand Down
32 changes: 32 additions & 0 deletions lamp_haproxy/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,35 @@

httpd_port: 80
ntpserver: 192.168.1.2

base_packages:
- httpd
- php
- php-mysql
- git

python_selinux_packages:
- libselinux-python
- libsemanage-python

nagios_packages:
- nagios
- nagios-plugins
- nagios-plugins-nrpe
- nagios-plugins-ping
- nagios-plugins-ssh
- nagios-plugins-http
- nagios-plugins-mysql
- nagios-devel

nagios_plugins_packages:
- nagios-nrpe
- nagios-plugins-swap
- nagios-plugins-users
- nagios-plugins-procs
- nagios-plugins-load
- nagios-plugins-disk

db_packages:
- mysql-server
- MySQL-python
7 changes: 1 addition & 6 deletions lamp_haproxy/roles/base-apache/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@

- name: Install http
yum:
name: "{{ item }}"
name: "{{ base_packages }}"
state: present
with_items:
- httpd
- php
- php-mysql
- git

- name: Configure SELinux to allow httpd to connect to remote database
seboolean:
Expand Down
14 changes: 2 additions & 12 deletions lamp_haproxy/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# This role contains common plays that will run on all nodes.

- name: Install python bindings for SE Linux
yum: name={{ item }} state=present
with_items:
- libselinux-python
- libsemanage-python
yum: name={{ python_selinux_packages }} state=present

- name: Create the repository for EPEL
copy: src=epel.repo dest=/etc/yum.repos.d/epel.repo
Expand All @@ -14,14 +11,7 @@
copy: src=RPM-GPG-KEY-EPEL-6 dest=/etc/pki/rpm-gpg

- name: install some useful nagios plugins
yum: name={{ item }} state=present
with_items:
- nagios-nrpe
- nagios-plugins-swap
- nagios-plugins-users
- nagios-plugins-procs
- nagios-plugins-load
- nagios-plugins-disk
yum: name={{ nagios_plugins_packages }} state=present

- name: Install ntp
yum: name=ntp state=present
Expand Down
5 changes: 1 addition & 4 deletions lamp_haproxy/roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# This role will install MySQL and create db user and give permissions.

- name: Install Mysql package
yum: name={{ item }} state=present
with_items:
- mysql-server
- MySQL-python
yum: name={{ db_packages }} state=present

- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
Expand Down
11 changes: 1 addition & 10 deletions lamp_haproxy/roles/nagios/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
# This will install nagios

- name: install nagios
yum: pkg={{ item }} state=present
with_items:
- nagios
- nagios-plugins
- nagios-plugins-nrpe
- nagios-plugins-ping
- nagios-plugins-ssh
- nagios-plugins-http
- nagios-plugins-mysql
- nagios-devel
yum: pkg={{ nagios_packages }} state=present
notify: restart httpd

- name: create nagios config dir
Expand Down
14 changes: 14 additions & 0 deletions lamp_simple/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@
httpd_port: 80
ntpserver: 192.168.1.2
repository: https://github.com/bennojoy/mywebapp.git

db_packages:
- mysql-server
- MySQL-python
- libselinux-python
- libsemanage-python

web_packages:
- httpd
- php
- php-mysql
- git
- libsemanage-python
- libselinux-python
9 changes: 1 addition & 8 deletions lamp_simple/roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
# This playbook will install mysql and create db user and give permissions.

- name: Install Mysql package
yum:
name: "{{ item }}"
state: installed
with_items:
- mysql-server
- MySQL-python
- libselinux-python
- libsemanage-python
yum: name={{ db_packages }} state=installed

- name: Configure SELinux to start mysql on any port
seboolean:
Expand Down
11 changes: 1 addition & 10 deletions lamp_simple/roles/web/tasks/install_httpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
# These tasks install http and the php modules.

- name: Install http and php etc
yum:
name: "{{ item }}"
state: present
with_items:
- httpd
- php
- php-mysql
- git
- libsemanage-python
- libselinux-python
yum: name={{ web_packages }} state=present

- name: insert iptables rule for httpd
lineinfile:
Expand Down
9 changes: 6 additions & 3 deletions lamp_simple/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@

- name: apply common configuration to all nodes
hosts: all
remote_user: root
become: yes
#remote_user: root

roles:
- common

- name: configure and deploy the webservers and application code
hosts: webservers
remote_user: root
become: yes
#remote_user: root

roles:
- web

- name: deploy MySQL and configure the databases
hosts: dbservers
remote_user: root
become: yes
#remote_user: root

roles:
- db
15 changes: 15 additions & 0 deletions lamp_simple_rhel7/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,18 @@
httpd_port: 80
ntpserver: 192.168.1.2
repository: https://github.com/bennojoy/mywebapp.git

common_packages:
- libselinux-python
- libsemanage-python
- firewalld

db_packages:
- mariadb-server
- MySQL-python

web_packages:
- httpd
- php
- php-mysql
- git
6 changes: 1 addition & 5 deletions lamp_simple_rhel7/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
tags: ntp

- name: Install common dependencies
yum: name={{ item }} state=installed
with_items:
- libselinux-python
- libsemanage-python
- firewalld
yum: name={{ common_packages }} state=installed

- name: Configure ntp file
template: src=ntp.conf.j2 dest=/etc/ntp.conf
Expand Down
5 changes: 1 addition & 4 deletions lamp_simple_rhel7/roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# This playbook will install MariaDB and create db user and give permissions.

- name: Install MariaDB package
yum: name={{ item }} state=installed
with_items:
- mariadb-server
- MySQL-python
yum: name={{ db_packages }} state=installed

- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
Expand Down
11 changes: 1 addition & 10 deletions lamp_simple_rhel7/roles/web/tasks/install_httpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
# These tasks install http and the php modules.

- name: Install httpd and php
yum: name={{ item }} state=present
with_items:
- httpd
- php
- php-mysql

- name: Install web role specific dependencies
yum: name={{ item }} state=installed
with_items:
- git
yum: name={{ web_packages }} state=present

- name: Start firewalld
service: name=firewalld state=started enabled=yes
Expand Down
8 changes: 8 additions & 0 deletions mongodb/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ iface: '{{ ansible_default_ipv4.interface }}'

# The password for admin user
mongo_admin_pass: 123456

mongodb_packages:
- libselinux-python
- mongo-10gen
- mongo-10gen-server
- bc
- python-pip

8 changes: 1 addition & 7 deletions mongodb/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@
file: path={{ mongodb_datadir_prefix }} owner=mongod group=mongod state=directory

- name: Install the mongodb package
yum: name={{ item }} state=installed
with_items:
- libselinux-python
- mongo-10gen
- mongo-10gen-server
- bc
- python-pip
yum: name={{ mongodb_packages }} state=installed

- name: Install the latest pymongo package
pip: name=pymongo state=latest use_mirrors=no
Expand Down
18 changes: 18 additions & 0 deletions wordpress-nginx/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,21 @@ auto_up_disable: false
#false = Development, minor, and major updates are all disabled
#minor = Minor updates are enabled, development, and major updates are disabled
core_update_level: true

db_packages:
- mysql-server
- MySQL-python
- libselinux-python
- libsemanage-python

php_packages:
- php
- php-fpm
- php-enchant
- php-IDNA_Convert
- php-mbstring
- php-mysql
- php-PHPMailer
- php-process
- php-simplepie
- php-xml
7 changes: 1 addition & 6 deletions wordpress-nginx/roles/mysql/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
---
- name: Install Mysql package
yum: name={{ item }} state=present
with_items:
- mysql-server
- MySQL-python
- libselinux-python
- libsemanage-python
yum: name={{ db_packages }} state=present

- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
Expand Down
13 changes: 1 addition & 12 deletions wordpress-nginx/roles/php-fpm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- name: Install php-fpm and deps
yum: name={{ item }} state=present
with_items:
- php
- php-fpm
- php-enchant
- php-IDNA_Convert
- php-mbstring
- php-mysql
- php-PHPMailer
- php-process
- php-simplepie
- php-xml
yum: name={{ php_packages }} state=present

- name: Disable default pool
command: mv /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.disabled creates=/etc/php-fpm.d/www.disabled
Expand Down
18 changes: 18 additions & 0 deletions wordpress-nginx_rhel7/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ auto_up_disable: false
# false = Development, minor, and major updates are all disabled
# minor = Minor updates are enabled, development, and major updates are disabled
core_update_level: true

mariadb_packages:
- mariadb-server
- MySQL-python
- libselinux-python
- libsemanage-python

php_packages:
- php
- php-fpm
- php-enchant
- php-IDNA_Convert
- php-mbstring
- php-mysql
- php-PHPMailer
- php-process
- php-simplepie
- php-xml
7 changes: 1 addition & 6 deletions wordpress-nginx_rhel7/roles/mariadb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
# This playbook will install MariaDB and create db user and give permissions.

- name: Install MariaDB package
yum: name={{ item }} state=installed
with_items:
- mariadb-server
- MySQL-python
- libselinux-python
- libsemanage-python
yum: name={{ mariadb_packages }} state=installed

- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
Expand Down
Loading