Unable to use generate templates using Python3 on CentOS due to missing libselinux-python package #50983
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
module
This issue/PR relates to a module.
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
SUMMARY
I am unable to run the template plugin, and generate a Jinja2 template with variables in it, when using Python3 on a CentOS server.
I believe this is due to the Python3 package 'libselinux-python' not being available for Python 3 on CentOS.
Reference these two links:
https://www.rpmfind.net/linux/rpm2html/search.php?query=libselinux-python
https://www.rpmfind.net/linux/rpm2html/search.php?query=libselinux-python3
ISSUE TYPE
COMPONENT NAME
template
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
CentOS Linux release 7.5.1804 (Core) running on a VM
$ python --version
Python 2.7.5
$ python3 --version
Python 3.6.5
STEPS TO REPRODUCE
bug.yml:
templates/bug.j2:
EXPECTED RESULTS
The playbook generates a new file called "bug.cfg" with the following output:
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: