Recommended way for installing python modules in execution environment

Hi ,

I have awx v21 running and created EE container and uploaded to our container registry (harbor).

I have setup EE in awx and checked option always pull.In my awx playbook i have added EE.

Question i have is :

Python module:

In future if i want to install more python modules in my EE what is recommended way? I meant do i need to create new docker image and add new modules to requirements.txt and then upload to my container registry with new tag And then edit in awx to pull EE with that tag?

Or

Add a pre task in my playbook to install python modules , which will be checked during play execution and run the install?

What is the best recommended way for installing py modules in EE.

Collections:
For collections i can add requirements.txt with roles repo so collections is not a problem here.When ever project is updated it will install collections.

Regards
Vish

Following up…

Regards
Vish

Hello,
You can use Ansible Builder to build the execution environment. We would recommend using that tool for this purpose. You can view more information about that here: https://ansible-builder.readthedocs.io/en/stable/

Once it is built, you can push it to a container registry. Then you will need to create an execution environment in AWX using that image location. Then you can make sure that your job templates are using that EE.