Merge pull request #39 from kustodian/selinux_disable_fix

Set selinux state to 'permissive' for state=disabled
This commit is contained in:
Brian Coca 2015-01-22 14:52:26 -05:00
commit 8c4b279552

View file

@ -174,14 +174,19 @@ def main():
if (state != runtime_state):
if module.check_mode:
module.exit_json(changed=True)
if (state == 'disabled'):
msgs.append('state change will take effect next reboot')
else:
if (runtime_enabled):
if (runtime_enabled):
if (state == 'disabled'):
if (runtime_state != 'permissive'):
# Temporarily set state to permissive
set_state('permissive')
msgs.append('runtime state temporarily changed from \'%s\' to \'permissive\', state change will take effect next reboot' % (runtime_state))
else:
msgs.append('state change will take effect next reboot')
else:
set_state(state)
msgs.append('runtime state changed from \'%s\' to \'%s\'' % (runtime_state, state))
else:
msgs.append('state change will take effect next reboot')
else:
msgs.append('state change will take effect next reboot')
changed=True
if (state != config_state):