# Installing collections automatically via requirements for Execution Environment

**URL:** <https://forum.ansible.com/t/installing-collections-automatically-via-requirements-for-execution-environment/37230>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [October 14, 2022, 8:03pm UTC](https://forum.ansible.com/t/installing-collections-automatically-via-requirements-for-execution-environment/37230 "2022-10-14T20:03:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Barros](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Daniel\_Barros](https://forum.ansible.com/u/Daniel_Barros)\
**Post date:** [October 14, 2022, 8:03pm UTC](https://forum.ansible.com/t/installing-collections-automatically-via-requirements-for-execution-environment/37230/1 "2022-10-14T20:03:45Z")

</div>

Hi guys. How are you?

Let’s say I have a structure like this uploaded to AWX.

source/

some\_organizational\_stuff/

playbooks/

playbook.yml

roles/

role\_example/

tasks/

main.yml

In this scenario, playbook.yml will be executed and it includes the role: role\_example.

role\_example makes use of the community. general collection or any other.

I’m trying to make AWX automatically download and install the collection using the file requirements.yml

But I have tried it many times, I tried placing it under roles, and I tried under role\_example. But none has worked.

I know it’s possible to add it to the repository or build a new execution environment. But for my current scenario, those options are not preferred.

Is it possible to dynamically make AWX download any collection based on requirements configuration?

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![kurokobo1](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kurokobo1](https://forum.ansible.com/u/kurokobo1)\
**Post date:** [October 14, 2022, 9:29pm UTC](https://forum.ansible.com/t/installing-collections-automatically-via-requirements-for-execution-environment/37230/2 "2022-10-14T21:29:40Z")

</div>

Hi,

Could you please try placing your `requirements.yml` as `collections/requirements.yml` on your project root and syncing your project?

Refer:  
[https://github.com/ansible/awx/blob/devel/docs/collections.md](https://github.com/ansible/awx/blob/devel/docs/collections.md)  
[https://docs.ansible.com/automation-controller/latest/html/userguide/projects.html#collections-support](https://docs.ansible.com/automation-controller/latest/html/userguide/projects.html#collections-support)

---

<div class="post-metadata">

**Author:** ![Daniel\_Barros](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Daniel\_Barros](https://forum.ansible.com/u/Daniel_Barros)\
**Post date:** [October 15, 2022, 2:36am UTC](https://forum.ansible.com/t/installing-collections-automatically-via-requirements-for-execution-environment/37230/3 "2022-10-15T02:36:26Z")

</div>

Yeeep

You are absolutely correct. Thank you for your help. Saved a lot of time here.

TASK [fetch galaxy collections from collections/requirements.(yml/yaml)] \*\*\*\*\*\*\*  
changed: [localhost] =\> (item=/var/lib/awx/projects/\_14\_\_test\_104907497\_pm/collections/requirements.yml)
