Merge pull request #41 from tgerla/fixselinux

detect selinux and act accordingly
pull/63/head
Tim Gerla 11 years ago
commit 26a0127934
  1. 5
      lamp_haproxy/roles/common/tasks/main.yml
  2. 1
      lamp_haproxy/roles/db/tasks/main.yml
  3. 1
      lamp_haproxy/roles/web/tasks/main.yml

@ -33,3 +33,8 @@
- name: insert iptables template
template: src=iptables.j2 dest=/etc/sysconfig/iptables
notify: restart iptables
- name: test to see if selinux is running
command: getenforce
register: sestatus
changed_when: false

@ -11,6 +11,7 @@
- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
when: sestatus.rc != 0
- name: Create Mysql configuration file
template: src=my.cnf.j2 dest=/etc/my.cnf

@ -10,6 +10,7 @@
- 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/