semaphore
semaphore copied to clipboard
Support unified requirements.yml for galaxy collections
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
@fiftin Anything stopping this from being code-reviewed/merged?
Hi @andreas-marschke
I'm here :) I reviewing.
is this still a thing? i'm on v2.9.16 and still having the problem that $repository/collections/requirements.yml is ignored :(
@rwaffen As it hasn't been merged yet, I don't think it's resolved.
it's a pitty. but how do you handle this as long this is not merged, is there a workaround for this?
@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.
any updates on getting this pr merged? @stefanux can help testing if needed
@fiftin any update on that one?
Any Updates?
Hi, I'm sorry @andreas-marschke I missed this PR. Looks like I did what you want.
@steadfasterX , @corincorvus could you please check this in latest release?
@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 Yes.
Ansible-lint docs for example:
Valid locations for these files are:
requirements.ymlroles/requirements.ymlcollections/requirements.yml