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

add no-deps option to ansible_galaxy_install for collections #4174

Closed
1 task done
MarkusTeufelberger opened this issue Feb 8, 2022 · 5 comments · Fixed by #4240
Closed
1 task done

add no-deps option to ansible_galaxy_install for collections #4174

MarkusTeufelberger opened this issue Feb 8, 2022 · 5 comments · Fixed by #4240
Labels
feature This issue/PR relates to a feature request has_pr language module module packaging plugins plugin (any type)

Comments

@MarkusTeufelberger
Copy link

Summary

I'd like to only have the collections and their versions that I explicitly described in requirements.yml downloaded by ansible-galaxy. There is a --no-deps switch available in ansible-galaxy collection/role install, but it is not exposed as an option by the module.

I only need this for type: collection - but it would of course be nice if it also would work of type: both or type: role is specified. Potentially there need to be 2 options to be able to install roles with and collections without dependencies for example.

Issue Type

Feature Idea

Component Name

ansible_galaxy_install

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

cc @russoz
click here for bot help

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request language module module packaging plugins plugin (any type) labels Feb 8, 2022
@russoz
Copy link
Collaborator

russoz commented Feb 9, 2022

Thanks for placing the ticket, @MarkusTeufelberger , will be looking into that in the next days/weeks.

@russoz
Copy link
Collaborator

russoz commented Feb 21, 2022

@MarkusTeufelberger any chance you have a fairly good example handy? I would like to write a test for that case.

@felixfontein
Copy link
Collaborator

@russoz: how about shipping a small collection (not sure, maybe a simple galaxy.yml file is already enough?) that depends on a non-existing collection; in the tests you can build a tarball from it (ansible-galaxy collection build), and then install that tarball with --no-deps. If --no-deps works it's possible to install the collection. (Assuming the building step does not check existence of the dependencies...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr language module module packaging plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants