Fix #40 -- test to see if selinux is enabled before running seboolean.

pull/63/head
Tim Gerla 11 years ago
parent b4945a10c3
commit c769d5e045
  1. 2
      lamp_simple/group_vars/all
  2. 5
      lamp_simple/roles/common/tasks/main.yml
  3. 1
      lamp_simple/roles/db/tasks/main.yml
  4. 1
      lamp_simple/roles/web/tasks/install_httpd.yml

@ -3,4 +3,4 @@
httpd_port: 80
ntpserver: 192.168.1.2
repository: http://github.com/bennojoy/mywebapp.git
repository: https://github.com/bennojoy/mywebapp.git

@ -13,3 +13,8 @@
- name: Start the ntp service
service: name=ntpd state=started enabled=true
tags: ntp
- 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
action: template src=my.cnf.j2 dest=/etc/my.cnf

@ -21,3 +21,4 @@
- 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