ansible / awx-ee

An Ansible execution environment for AWX project
https://quay.io/ansible/awx-ee
Other
129 stars 151 forks source link

unable to use lookups that require python modules to be installed #220

Open tylergmuir opened 7 months ago

tylergmuir commented 7 months ago

I ran into an issue recently where a python module was required to be installed for a lookup plugin. If you install the python module within a playbook it is made available to other ansible modules, but not to lookups. This is because the python module is installed in the user site path which doesn't exist prior to the playbook being run. That then causes the python path of the playbook to not include the user site path.

There are some hacky workarounds for this, but it seems like the most elegant solution to this is to pre-create the user site path as a part of the container.

This allows users the option of using a step in their playbook to install a python module required for a lookup without forcing them to build a custom container with that python module pre-installed or at a minimum having to pre-create the user site path themselves.