You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using "action: command /usr/sbin/setenforce 0" in a playbook to disable SELinux only works once. Any consecutive runs after that will fail with the following message.
That it will behave like it does from the terminal, set SELinux to disabled every time it is run. Which it in a sense does, but from an ansible perspective it fails.
Workaround:
Install the python dependency for selinux and use the selinux module.
Test bed:
CentOS 5.9 and CentOS 6.3
The text was updated successfully, but these errors were encountered:
Ansible version: 1.0
Problem:
Using "action: command /usr/sbin/setenforce 0" in a playbook to disable SELinux only works once. Any consecutive runs after that will fail with the following message.
CentOS 6.3:
"failed: [el6_ansible_1] => {"changed": true, "cmd": ["/usr/sbin/setenforce", "0"], "delta": "0:00:00.001085", "end": "2013-02-12 10:36:39.363762", "rc": 1, "start": "2013-02-12 10:36:39.362677"}
stderr: /usr/sbin/setenforce: SELinux is disabled"
CentOS 5.9:
"failed: [el5_ansible_1] => {"changed": true, "cmd": ["/usr/sbin/setenforce", "0"], "delta": "0:00:00.000992", "end": "2013-02-12 10:36:39.294839", "rc": 1, "start": "2013-02-12 10:36:39.293847"}
stderr: /usr/sbin/setenforce: SELinux is disabled"
Expected behavior:
That it will behave like it does from the terminal, set SELinux to disabled every time it is run. Which it in a sense does, but from an ansible perspective it fails.
Workaround:
Install the python dependency for selinux and use the selinux module.
Test bed:
CentOS 5.9 and CentOS 6.3
The text was updated successfully, but these errors were encountered: