Use this tag for questions regarding Ansible Galaxy (a site for publishing and downloading the roles) and the `ansible-galaxy` command-line tool. For general questions regarding Ansible roles use tag:ansible-role
Questions tagged [ansible-galaxy]
128 questions
2
votes
1 answer
Always run ansible role before other role
I'm trying to find my way out of a dependency thicket. I'm using Ansible 1.9.2.
In a single playbook, I want to be able to install a Galaxy role (in the event, the Datadog.datadog role) and configure it. But Ansible always barfs; since the…

maxn
- 21
- 4
2
votes
1 answer
Ansible galaxy: expected a role name in dictionary
I have an ansible playbook with roles listed. One of the roles have a tag, and it is ansible galaxy role. I have it installed with ansible-galaxy install.
Playbook part:
roles:
... roles here
- {name: httplab.ffmpeg, tags: ffmpeg}
On playbook…

Igor Loskutov
- 2,157
- 2
- 20
- 33
1
vote
2 answers
How to mark an Ansible Role in a Collection as deprecated?
I manage an Ansible Collection on Ansible Galaxy with multiple roles in it and want to mark some of those roles as deprecated. How can I do this?
In the Ansible documentation there is only a solution for modules.
Can this be adopted to the roles?

Hunter
- 23
- 4
1
vote
1 answer
Ansible List or Dict doesn't work with community.docker.docker_container module
From this:
cat /etc/hosts
172.26.42.112 test.foobar
172.26.42.112 elastic.foobar
- vars:
- docker_add_end: ['elastic', 'test']
To this:
- ansible.builtin.shell: |
IP=$(cut -d ' ' -f 1 <<< "$(grep {{ item }} /etc/hosts)")
FQDNHOST=$(cut…

Felipe Diefenbach
- 21
- 4
1
vote
0 answers
Error installing Ansible Collection from Requirements file
I'm trying to install the cyberark.pas collection using a requirements file in my project. Today I install the collection from AWX via ansible Galaxy, but the job fails a couple of times a day with the following error:
"stderr": "ERROR! Unexpected…

D. Desjardins
- 13
- 1
- 4
1
vote
1 answer
Ansible Naming Rules for Roles and Collections (dash, underscore)
Does Ansible have naming rules for roles and collections regarding the use of - (dash) and _ (underscore)?
I noticed that since around 2019, geerlingguy only uses underscores for role names (snake_case), but the names of his older roles contain…

phanaz
- 1,188
- 8
- 17
1
vote
1 answer
How do I run ansible-galaxy installations using AWX?
So I've read over the other articles that are similar to this question and while they provided an accepted answer, I wasn't able to quite get there. I am running AWX on Fedora 35. I have installed it using the following…

Dustin Burmeister
- 31
- 6
1
vote
1 answer
Install collection dependencies in ansible with differing proxy settings
Problem: I want to install a collection via ansible-galaxy, but one needs a proxy and the other one does not
galaxy.html of the needed collection:
dependencies:
community.docker: 2.4.0
git+https://gitlab.test.org/collections/test:…

Zu Jiry
- 193
- 1
- 12
1
vote
1 answer
Get logs while developing an Ansible Collection
I'm wondering when developing an Ansible Collection, is it possible to get arbitrary logs written to a log file/console?
This being a random print() statement to help debugging, or is the only way just to concatenate your final return message?
Thank…

Kieran O Mahony
- 11
- 1
1
vote
0 answers
Automation Hub collections by AWX
On my AWX System I've configure collection in requirement.yml and all is fine.
Now, I need to insert another collection providing by Automation Hub. That's means the source is in another place. I've read this document Downloading a collection from…

hiero-nymus
- 31
- 4
1
vote
1 answer
How to ignore missing role error on Ansible
We have an ansible project using a lot of roles which are not included in the same git repository (I will refer to it as external roles). We use ansible-galaxy with a requirements.yml file to install these roles but we have to run it manually and…

Charly Roch
- 368
- 1
- 4
- 15
1
vote
0 answers
"sudo: no password was provided" when running an Ansible module with `local_action`
I'm trying to use this github_key community module to add an SSH publickey to a Github account.
(I installed the community module with ansible-galaxy collection install community.general)
In my task list, I -
Read the publickey
Call github_key…

user2490003
- 10,706
- 17
- 79
- 155
1
vote
1 answer
Ansible Galaxy collection dependency SSH error with private GitHub repo
Being new to Ansible collections I’m hoping I’ve missed something obvious here in my attempt to refactor some old Ansible roles into collections using private GitHub repositories.
I have GitHub setup with 2 linked accounts. I’ll call the main…

David
- 105
- 9
1
vote
0 answers
Installing amazon.aws or community.aws collection through requirements.yml is not working
This is my requirements.yml file
---
collections:
- amazon.aws
- community.aws
and I run the command
ansible-galaxy install -r requirements.yml
The command runs and silently finishes. Is this right? Should it not tell whether it is installing…

Pankaj Lal
- 307
- 1
- 12
1
vote
1 answer
A method for listing Ansible modules used by playbooks
I'm creating a requirements.yml in an Ansible project, and I want to identify all of the modules that need to be installed from ansible-galaxy that are used by project playbooks. ansible-doc --list --playbook-dir foo seems like the right tool for…

JR.
- 311
- 1
- 13