# Missing python modules in container\_group triggered pods

**URL:** <https://forum.ansible.com/t/missing-python-modules-in-container-group-triggered-pods/33694>\
**Category:** AWX Project\
**Tags:** windows, awx, kubernetes\
**Created:** [August 28, 2020, 12:12pm UTC](https://forum.ansible.com/t/missing-python-modules-in-container-group-triggered-pods/33694 "2020-08-28T12:12:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vibin](https://avatars.discourse-cdn.com/v4/letter/v/2bfe46/32.png) [@Vibin](https://forum.ansible.com/u/Vibin)\
**Post date:** [August 28, 2020, 12:12pm UTC](https://forum.ansible.com/t/missing-python-modules-in-container-group-triggered-pods/33694/1 "2020-08-28T12:12:19Z")

</div>

Hello Team,

I’m trying to make use of the container\_groups feature in my AWX project on K8s.

Found out that the normal tower instance uses two python virtual environments (/var/lib/awx/venv/awx and /var/lib/awx/venv/ansible) and when jobs are triggered it uses the ansible venv and gets all the available python modules (pre-installed).

But when I am using container\_groups, the jobs against Linux boxes are working fine but have problems connecting to Windows servers (fails with no module found - pywinrm).

On checking the container group triggered pods, it doesn’t have any venv and does not have the required python modules (for example, pywinrm/pykerberos/requests). Not sure, whether am missing anything in pod definition.

Please see the attached pod.yml am using for the container groups and let me know if there is any fix/solution to this issue.

Appreciate your earliest response.

Regards,  
Vibin

> **(attachments)**
>
> [pod-definition.txt](https://forum.ansible.com/uploads/short-url/vZ8Yk5w2v4dtYTM2OsNXlMzAR72.txt) (4.41 KB)

---

<div class="post-metadata">

**Author:** ![sdmorel](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sdmorel](https://forum.ansible.com/u/sdmorel)\
**Post date:** [September 1, 2020, 7:29am UTC](https://forum.ansible.com/t/missing-python-modules-in-container-group-triggered-pods/33694/2 "2020-09-01T07:29:01Z")

</div>

Hello,

Have you tried including a task to install the required python modules in the playbook?

---

<div class="post-metadata">

**Author:** ![Vibin](https://avatars.discourse-cdn.com/v4/letter/v/2bfe46/32.png) [@Vibin](https://forum.ansible.com/u/Vibin)\
**Post date:** [September 1, 2020, 6:18pm UTC](https://forum.ansible.com/t/missing-python-modules-in-container-group-triggered-pods/33694/3 "2020-09-01T18:18:42Z")

</div>

Hello,

Thanks for the response.

Nope, but then that’ll require all playbooks to have that task with them which I feel won’t be appealing to the developers.

I was more looking for a solution which can be manipulated with the container group pod definition or out of the box with this feature.

Regards,  
Vibin

---

<div class="post-metadata">

**Author:** ![Vibin](https://avatars.discourse-cdn.com/v4/letter/v/2bfe46/32.png) [@Vibin](https://forum.ansible.com/u/Vibin)\
**Post date:** [September 5, 2020, 6:40am UTC](https://forum.ansible.com/t/missing-python-modules-in-container-group-triggered-pods/33694/4 "2020-09-05T06:40:10Z")

</div>

Hello All,

Figured it out.

If you are using container groups, then another image comes into play ie; ansible-runner and it has a very limited set of python modules which are used while running jobs.

So if you wanna add new modules, then you need to do that in the ansible runner image.

Also, we don’t need to have additional containers in the container group POD definition file. Just the default one is enough (change the namespace and add other details as needed).

Hope this helps someone facing issues like I had.

Regards,  
Vibin
