Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible-examples.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Johnson <dave@ansible.com>2016-09-27 19:11:14 +0300
committerDave Johnson <dave@ansible.com>2016-09-27 19:11:14 +0300
commit746d246bfffa0442d46d80a3a5537d532f036b70 (patch)
tree13fe4280d65f79fdc4a5ec900f04a9bb63695e47
parent5fbc7dda056692eb763b20d3cad27eec2b34a1e2 (diff)
Moved php, etc. installation from the web role to the base-apache role
-rw-r--r--lamp_haproxy/roles/base-apache/tasks/main.yml7
-rw-r--r--lamp_haproxy/roles/web/tasks/main.yml13
2 files changed, 7 insertions, 13 deletions
diff --git a/lamp_haproxy/roles/base-apache/tasks/main.yml b/lamp_haproxy/roles/base-apache/tasks/main.yml
index 0fbdd4e..e06a1a8 100644
--- a/lamp_haproxy/roles/base-apache/tasks/main.yml
+++ b/lamp_haproxy/roles/base-apache/tasks/main.yml
@@ -5,6 +5,13 @@
yum: name={{ item }} state=present
with_items:
- httpd
+ - php
+ - php-mysql
+ - git
+
+- name: Configure SELinux to allow httpd to connect to remote database
+ seboolean: name=httpd_can_network_connect_db state=true persistent=yes
+ when: sestatus.rc != 0
- name: http service state
service: name=httpd state=started enabled=yes
diff --git a/lamp_haproxy/roles/web/tasks/main.yml b/lamp_haproxy/roles/web/tasks/main.yml
index 7225312..e3141ac 100644
--- a/lamp_haproxy/roles/web/tasks/main.yml
+++ b/lamp_haproxy/roles/web/tasks/main.yml
@@ -1,16 +1,3 @@
---
-
-# httpd is handled by the base-apache role upstream
-- name: Install php and git
- yum: name={{ item }} state=present
- with_items:
- - php
- - php-mysql
- - git
-
-- name: Configure SELinux to allow httpd to connect to remote database
- seboolean: name=httpd_can_network_connect_db state=true persistent=yes
- when: sestatus.rc != 0
-
- name: Copy the code from repository
git: repo={{ repository }} version={{ webapp_version }} dest=/var/www/html/