ansible-galaxy vs. ansible-galaxy collections

37 views
Skip to first unread message

Hiero-nymo

unread,
Mar 4, 2022, 10:36:14 AM3/4/22
to Ansible Project
Hi everyone,

On the ansible documentation, I found the collection "the foreman.foreman" here's the link: theforeman.foreman

This collection can manually be installed like:
ansible-galaxy collection install the foreman.foreman and all seems ok.

So, now I need to do the same things but automatically through the requirements.yml file, like this:
---
collections:
- theforeman.foreman


Unfortunately this collection will not be find and when I do a search into ansible-galaxy I don't find it.

Is the collection something else than ansible-galaxy?
I've the feeling that something goes wrong but I don't know what.
Has anyone an idea about my issue?
Could someone explain me the difference between these both repo?

Thank you in advance for your help,

Dick Visser

unread,
Mar 4, 2022, 10:55:48 AM3/4/22
to ansible...@googlegroups.com
"works for me"

$ cat r.yml
---
collections:
- theforeman.foreman

$ ANSIBLE_COLLECTIONS_PATH=$(python -c "import site;
print(site.getsitepackages()[0])") ansible-galaxy collection install
-r r.yml
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'theforeman.foreman:3.2.0' to
'/Users/dick.visser/eduteams/customers/dick/venv/lib/python3.9/site-packages/ansible_collections/theforeman/foreman'
Downloading https://galaxy.ansible.com/download/theforeman-foreman-3.2.0.tar.gz
to /Users/dick.visser/.ansible/tmp/ansible-local-224752svvc2ov/tmpd74dil8_
theforeman.foreman (3.2.0) was installed successfully
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c9118723-986e-44fa-9a36-59a559b6f201n%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

John Petro

unread,
Mar 4, 2022, 11:30:36 AM3/4/22
to ansible...@googlegroups.com
Maybe you have a formatting issue with your requirements.yml.   Mine looks like this, and it worked no problem.

collections:
   - name: theforeman.foreman

Hiero-nymo

unread,
Mar 7, 2022, 7:00:18 AM3/7/22
to ansible...@googlegroups.com
Thank you for your help.
I have configured it as you told me and it works well....

Best regards
Reply all
Reply to author
Forward
0 new messages