Skip to content

Commit

Permalink
Skip configure SELinux (mysql_connect_any) when getenforce is 'Disabled'
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyoko committed Jun 5, 2014
1 parent 085cdbb commit 9a98183
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wordpress-nginx/roles/common/tasks/main.yml
@@ -1,4 +1,9 @@
---
- name: Check if selinux is running
command: getenforce
register: sestatus
changed_when: false

- name: Install libselinux-python
yum: name=libselinux-python state=present

Expand Down
1 change: 1 addition & 0 deletions wordpress-nginx/roles/mysql/tasks/main.yml
Expand Up @@ -9,6 +9,7 @@

- name: Configure SELinux to start mysql on any port
seboolean: name=mysql_connect_any state=true persistent=yes
when: sestatus.stdout != "Disabled"

- name: Create Mysql configuration file
template: src=my.cnf.j2 dest=/etc/my.cnf
Expand Down

0 comments on commit 9a98183

Please sign in to comment.