semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Support unified requirements.yml for galaxy collections

Open andreas-marschke opened this issue 2 years ago • 13 comments

This changeset provides support to find ansible-galaxy collection requirements.yml relative to repo path, in the collections/ directory. This supports inventory organisations where only one requirements.yml is set up for the entire repo.

This partially resolves issues reported here: ansible-semaphore/semaphore#1144

andreas-marschke avatar May 15 '23 09:05 andreas-marschke

@fiftin Anything stopping this from being code-reviewed/merged?

andreas-marschke avatar Jul 04 '23 13:07 andreas-marschke

Hi @andreas-marschke

I'm here :) I reviewing.

fiftin avatar Jul 22 '23 20:07 fiftin

is this still a thing? i'm on v2.9.16 and still having the problem that $repository/collections/requirements.yml is ignored :(

rwaffen avatar Sep 13 '23 15:09 rwaffen

@rwaffen As it hasn't been merged yet, I don't think it's resolved.

andreas-marschke avatar Sep 13 '23 18:09 andreas-marschke

it's a pitty. but how do you handle this as long this is not merged, is there a workaround for this?

rwaffen avatar Sep 13 '23 21:09 rwaffen

@rwaffen defining two requirement-files is the way to go and working (in 2.8.90, tested again with latest version 2.9.4): roles/requirements.yml collections/requirements.yml

minimal example for collections:

---
collections:
  - name: community.general

requirements are cached and only refreshed if file(s) are changed: "roles/requirements.yml has no changes. Skip galaxy install process.". if you experience problems see output of semaphore and make another issue since this is a feature issue.

stefanux avatar Sep 21 '23 19:09 stefanux

any updates on getting this pr merged? @stefanux can help testing if needed

RusticPotatoes avatar Dec 01 '23 02:12 RusticPotatoes

@fiftin any update on that one?

steadfasterX avatar Apr 17 '24 13:04 steadfasterX

Any Updates?

smooth-baking-powder avatar May 07 '24 18:05 smooth-baking-powder

Hi, I'm sorry @andreas-marschke I missed this PR. Looks like I did what you want.

image

fiftin avatar May 27 '24 22:05 fiftin

@steadfasterX , @corincorvus could you please check this in latest release?

fiftin avatar May 27 '24 22:05 fiftin

@fiftin, looks like a unified requirements.yml file in the root directory of the project is not yet supported, right? But this would be really great! :wink:

Do you think you could possibly enhance this by adding the <project_root>/requirements.yml path to the search path, for collections as well as roles?

This would enable us to follow the structure outlined in the Ansible documentation here: Installing roles and collections from the same requirements.yml file

Thanks for all your work! Alex

alexbarton avatar Jul 31 '24 19:07 alexbarton

@alexbarton Yes.

Ansible-lint docs for example:

Valid locations for these files are:

deadnews avatar Aug 01 '24 05:08 deadnews