diff options
author | Tim Gerla <tim@gerla.net> | 2013-11-27 07:35:50 +0400 |
---|---|---|
committer | Tim Gerla <tim@gerla.net> | 2013-11-27 07:35:50 +0400 |
commit | c769d5e045cb8e5b992c9ad71f9ee2109cb2c897 (patch) | |
tree | daea1ce71177f1c440ef67dbf5015991f22529b3 /lamp_simple | |
parent | b4945a10c324a18cf286973870a14f0750c2903f (diff) |
Fix #40 -- test to see if selinux is enabled before running seboolean.
Diffstat (limited to 'lamp_simple')
-rw-r--r-- | lamp_simple/group_vars/all | 2 | ||||
-rw-r--r-- | lamp_simple/roles/common/tasks/main.yml | 5 | ||||
-rw-r--r-- | lamp_simple/roles/db/tasks/main.yml | 1 | ||||
-rw-r--r-- | lamp_simple/roles/web/tasks/install_httpd.yml | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/lamp_simple/group_vars/all b/lamp_simple/group_vars/all index 8b6ffdd..74ca458 100644 --- a/lamp_simple/group_vars/all +++ b/lamp_simple/group_vars/all @@ -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 diff --git a/lamp_simple/roles/common/tasks/main.yml b/lamp_simple/roles/common/tasks/main.yml index d337b90..cb65f03 100644 --- a/lamp_simple/roles/common/tasks/main.yml +++ b/lamp_simple/roles/common/tasks/main.yml @@ -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 diff --git a/lamp_simple/roles/db/tasks/main.yml b/lamp_simple/roles/db/tasks/main.yml index 15d8235..3e269c5 100644 --- a/lamp_simple/roles/db/tasks/main.yml +++ b/lamp_simple/roles/db/tasks/main.yml @@ -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 diff --git a/lamp_simple/roles/web/tasks/install_httpd.yml b/lamp_simple/roles/web/tasks/install_httpd.yml index 88ca402..7600c91 100644 --- a/lamp_simple/roles/web/tasks/install_httpd.yml +++ b/lamp_simple/roles/web/tasks/install_httpd.yml @@ -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 |