Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support collection-requirements.yml #149

Merged
merged 1 commit into from May 5, 2022

Conversation

richm
Copy link
Contributor

@richm richm commented May 4, 2022

There is no way for a role to automatically require collections for
module/plugin dependencies. Use the non-standard file
meta/collection-requirements.yml for this. Note that
meta/requirements.yml is supposed to be a list of roles only, in
the format described at https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-multiple-roles-from-multiple-files
If we find a meta/requirements.yml file, and it is not in list
format, assume it is an old one that has not yet been renamed to
meta/collection-requirements.yml, use it, and warn the user.

There is no way for a role to automatically require collections for
module/plugin dependencies.  Use the non-standard file
`meta/collection-requirements.yml` for this.  Note that
`meta/requirements.yml` is supposed to be a list of roles only, in
the format described at https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-multiple-roles-from-multiple-files
If we find a `meta/requirements.yml` file, and it is not in `list`
format, assume it is an old one that has not yet been renamed to
`meta/collection-requirements.yml`, use it, and warn the user.
@richm
Copy link
Contributor Author

richm commented May 4, 2022

This is related to linux-system-roles/tox-lsr#78

@richm richm requested review from nhosoi and spetrosi May 4, 2022 23:29
continue # legacy role format
if rqf == legacy_rqf:
logging.warning(
"The role %s is still using %s - please convert to %s instead",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering to convert requirements.yml to collection-requirements.yml, are there anything else to do other than renaming the filename?

continue # legacy role format
if rqf == legacy_rqf:
logging.warning(
"The role %s is still using %s - please convert to %s instead",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering to convert requirements.yml to collection-requirements.yml, are there anything else to do other than renaming the filename?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Contributor

@nhosoi nhosoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@richm richm merged commit b77c22e into linux-system-roles:master May 5, 2022
@richm richm deleted the collection-requirements branch May 5, 2022 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants