freetimetime
freetimetime

Reputation: 43

How can I install galaxy collections in awx?

I use a plugin such as nginx in ansible playbook.

https://galaxy.ansible.com/nginxinc/nginx_core

On server I can use cli to install the roles and collections as

ansible-galaxy collection install nginxinc.nginx_core

But how can I install it on AWX(Tower)?

I tried to run the command in one of AWX container - awx-ee (others are awx-web, awx-task, redis). When run a template in AWX, it still caused a role not found error.

Upvotes: 3

Views: 18028

Answers (1)

motorbass
motorbass

Reputation: 226

In addition to @Zeitounator comment, you could also manually install your collection into a dedicated path (i.e into collections folder from awx directory)

If you use a requirements.yml file :

sudo -u awx_user ansible-galaxy collection install -r /var/lib/awx/projects/my_project/collections/requirements.yml -p /var/lib/awx/projects/my_project/collections

or manually

ansible-galaxy collection install ansible.my_collection -f
'/home/.ansible/collections/ansible_collections/ansible/my_collection'

Upvotes: 1

Related Questions