cloud-pak-ocp-4 icon indicating copy to clipboard operation
cloud-pak-ocp-4 copied to clipboard

No module named selinux

Open fketelaars opened this issue 2 years ago • 0 comments

TASK [Allow nginx to listen on non-standard port (SELinux)] ******************************************************************************************************************** Monday 05 September 2022 09:52:08 +0200 (0:00:00.554) 0:00:49.500 ****** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'selinux' fatal: [localhost]: FAILED! => changed=false msg: Failed to import the required Python library (libselinux-python) on bastion.coc.uk.ibm.com's Python /usr/bin/python3.8. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter


** Solution ** Use shell commands to adapt selinux settings. The semodule has different behaviours and has been deprecated in later versions of Ansible.

fketelaars avatar Sep 05 '22 07:09 fketelaars