Ansible playbook fails with libselinux-python aren't installed on RHEL8

Solution Verified - Updated -


  • When running an Ansible playbook against an RHEL8 system, it throws the error below even after the python3-libselinux. package has been installed

    Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!".


  • Red Hat Enterprise Linux 8
  • Ansible Engine 2.8+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content