Install a Python module into AWX

I have deployed AWX:0.13.0 and one of my users asked me " the AWX pod acting as the ansible controller will need to have the jmespath python module installed for the CIS rules".
Is it possible to install jmespath inside the Kubernetes pod or deployment?

I apologise in advance if this is a stupid question.

You do that by creating a custom execution environment

Hi,
Thanks for you reply. Do you have any instructions on how to create a custom execution environment ?

I wrote an article on it. Some things need to be incremented like the ansible runner.

  • RUN pip3 uninstall --yes ansible-runner && pip3 install ansible-runner==2.0.0a1

Maybe 2.0.2 as of August 13
https://pypi.org/project/ansible-runner/#history

. But the instructions should be relatively the same.

https://weiyentan.github.io/2021/creating-execution-environments/

A reminder. Every time you upgrade awx you have to recreate the awx ee

Andrew,

You certainly can create an “execution environment” with the modifications you require. I had an issue a few months ago where I needed to install additional python modules in the execution environment. I struggled finding documentation on how to achieve this.

I came up with a workaround that I liked better than modifying the execution environment. In my deployment, the host is Ubuntu 20.04, with AWX operator installed via microk8s, and using NGINX for SSL offload. After hitting a brick wall on how to update the execution environment, I simply installed the appropriate modules on the Ubuntu host, and delegated that particular playbook to the host, instead of the execution environment in the container environment on the host.

Cheers!