Bug ID 1187531
Summary Ansible: missing python3-selinux requirement
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Other
Assignee screening-team-bugs@suse.de
Reporter felix.niederwanger@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

On a fresh Tumbleweed system, the ansible-playbook command fails due to missing
python3-selinux dependencies as follows

> ansible-playbook -i inventory duck-norris.yml 
> ERROR! Unexpected Exception, this is probably a bug: Failed to detect selinux python bindings at ['/usr/lib64/python3.8/site-packages', '/usr/lib64/python3.8/site-packages', '/usr/lib/python3.8/site-packages', '/usr/local/lib64/python3.8/site-packages', '/usr/local/lib64/python3.8/site-packages', '/usr/local/lib/python3.8/site-packages']
> the full traceback was:
> 
> Traceback (most recent call last):
>   File "/usr/bin/ansible-playbook", line 92, in <module>
>     mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
>   File "/usr/lib/python3.8/site-packages/ansible/cli/__init__.py", line 25, in <module>
>     from ansible.parsing.dataloader import DataLoader
>   File "/usr/lib/python3.8/site-packages/ansible/parsing/dataloader.py", line 17, in <module>
>     from ansible.module_utils.basic import is_executable
>   File "/usr/lib/python3.8/site-packages/ansible/module_utils/basic.py", line 74, in <module>
>     import selinux
>   File "/home/phoenix/.local/lib/python3.8/site-packages/selinux/__init__.py", line 104, in <module>
>     check_system_sitepackages()
>   File "/home/phoenix/.local/lib/python3.8/site-packages/selinux/__init__.py", line 100, in check_system_sitepackages
>     raise Exception(
> Exception: Failed to detect selinux python bindings at ['/usr/lib64/python3.8/site-packages', '/usr/lib64/python3.8/site-packages', '/usr/lib/python3.8/site-packages', '/usr/local/lib64/python3.8/site-packages', '/usr/local/lib64/python3.8/site-packages', '/usr/local/lib/python3.8/site-packages']

Simply installing python3-selinux fixes the issue and we should probably
include this in the spec file.


You are receiving this mail because: