Skip to content

Commit

Permalink
Merge pull request ansible#146 from boyvanduuren/lamp_simple_rhel7
Browse files Browse the repository at this point in the history
Fixes (ansible#145) missing package + package install order
  • Loading branch information
Dave Johnson authored Jul 21, 2016
2 parents 37d447d + 6a89842 commit efa1eba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
7 changes: 7 additions & 0 deletions lamp_simple_rhel7/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
yum: name=ntp state=present
tags: ntp

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

- name: Configure ntp file
template: src=ntp.conf.j2 dest=/etc/ntp.conf
tags: ntp
Expand Down
5 changes: 3 additions & 2 deletions lamp_simple_rhel7/roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
with_items:
- mariadb-server
- MySQL-python
- libselinux-python
- libsemanage-python

- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
Expand All @@ -26,6 +24,9 @@
- name: Start MariaDB Service
service: name=mariadb state=started enabled=yes

- name: Start firewalld
service: name=firewalld state=started enabled=yes

- name: insert firewalld rule
firewalld: port={{ mysql_port }}/tcp permanent=true state=enabled immediate=yes

Expand Down
11 changes: 8 additions & 3 deletions lamp_simple_rhel7/roles/web/tasks/install_httpd.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
---
# These tasks install http and the php modules.

- name: Install http and php etc
- 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
- libsemanage-python
- libselinux-python

- name: Start firewalld
service: name=firewalld state=started enabled=yes

- name: insert firewalld rule for httpd
firewalld: port={{ httpd_port }}/tcp permanent=true state=enabled immediate=yes
Expand Down

0 comments on commit efa1eba

Please sign in to comment.