Problem scenario
You try to run an Ansible playbook, but you get an error like this: "msg: Aborting target uses selinux but python bindings (libselinux-python) aren't installed!"
You are using a Red Hat derivative of Linux (e.g., Red Hat Enterprise Linux, CentOS or Fedora) and Python 3. What should you do?
Solution
Prerequisite
Install pip3. If you need assistance, see this posting.
Procedures
Run this command: sudo pip3 install selinux