-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selinux module fails if selinux is not installed #21622
Comments
+1 faced similar issue when selinux is not installed on centOS6 - name: Ensure Selinux Disabled
selinux: state=disabled
when: ansible_os_family == 'RedHat'
become: True
|
* Refactor code * PEP8 fixes * Check if /etc/selinux/config file exists before proceeding any other operations Fixes ansible#21622 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
resolved_by_pr #24437 |
* Refactor code * PEP8 fixes * Check if /etc/selinux/config file exists before proceeding any other operations Fixes #21622 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This is still very much a problem if SELINUX is missing Ansible 2.6.4
|
@boxrick Could you please open a new issue with your playbook and environment details ? In that way it will be easy to track your issue rather than posting here. Thanks. |
ISSUE TYPE
COMPONENT NAME
selinux module
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
If a task wants to set selinux to
permissive
, but selinux is not installed (RPMS have been erased, /etc/selinux/config doesn't exist) the module fails because it cannot find the config file. This particular case should be OK, as setting it to permissive is effectively disabling it, and it's already disabled.STEPS TO REPRODUCE
deploy a CentOS/RHEL vm, delete the selinux rpms, rm -rf /etc/selinux
Then attempt to disable to set selinux to permissive
EXPECTED RESULTS
Since selinux is not installed, it should be a noop
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: