opensearch-project / ansible-playbook

🤖 A community repository for Ansible Playbook of OpenSearch Project.
https://opensearch.org/
Apache License 2.0
81 stars 97 forks source link

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

Open FactorT opened 1 year ago

FactorT commented 1 year ago

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 commented 1 year ago

+1

heiderich commented 1 year ago

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.