ansible version:
ansible [core 2.17.3]
config file = /home/cas12/ansibleinthreeweeks/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.4
libyaml = True
Python version 3.10.12
ansible-playbook -i i.yaml prometheus.yaml
Error message:
failed to import the required Python library (libselinux-python) on cas12's Python /usr/bin/python3.11.
Python version 3.11
prometheus.yaml
So ansible_playbook uses 3.10 instead of 3.11
1