I am playing around with AWX and want to load a role (or “project” I suppose is the new term) that has some custom libraries and filter_plugins. The problem is that these python scripts require py libs that were never installed in the docker image.
Is there a way to configure an additional PYTHONPATH?
I think I should be able to mount a volume (e.g. /opt/custom-python/libs) into the container and install my python there, then make sure that ever custom role adds sys.path.append(custom_py_path) before the imports.
But … I’d prefer to not have to do that.
You could also modify the python requirements files for the image. requirements_ansible is what controls what gets loaded into the ansible virtualenv for use during playbook runs.
Is the “python requirements file” the list of python packages that are installed when the docker image is created? I’m trying not to have a role change to trigger a manual modification and upgrade of AWX.
I assume you’re talking about the ./requirements/requirements_ansible.txt file.