Skip to content
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

[BUG][No module named 'selinux' during executing of task "Disable the selinux"] #111

Open
FactorT opened this issue Feb 8, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@FactorT
Copy link

FactorT commented Feb 8, 2023

Describe the bug
When task "Disable the selinux" runs on OS without installed SELinux, for example Debian, it is failed with error: "An exception occurred during task execution. The error was: ModuleNotFoundError: No module named 'selinux'".
Fixed by PR 113

To Reproduce
Run playbook opensearch.yaml to install system on debian OS without installed selinux.
The playbook is failed with error "ModuleNotFoundError: No module named 'selinux'"

Expected behavior
Playbook ignore missing selinux

Playbook Name
opensearch.yml playbook - roles linux - opensearch - tasks main - task "Disable the selinux"
opensearch.yml playbook - roles linux - dashboards - tasks main - task "Disable the selinux"

Host/Environment (please complete the following information):
ansible [core 2.14.2]
python version = 3.9.2
jinja version = 3.1.2
Playbook Version: 2.3.0

@tibz7
Copy link

tibz7 commented Mar 14, 2023

+1

@heiderich
Copy link
Contributor

I have a similar issue with Debian bullseye and ansible 2.10.8. However the error is

{"changed": false, "details": "Please install SELinux-policy package, if this package is not installed previously.", "msg": "Unable to find file /etc/selinux/config"}

I address this in #122 build on top of #113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: 📦 Backlog
Development

No branches or pull requests

5 participants