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

ansible_galaxy_install has no update functionality that reports only updated collections as changed #8351

Closed
1 task done
bluikko opened this issue May 13, 2024 · 5 comments · Fixed by #8431
Closed
1 task done
Labels
feature This issue/PR relates to a feature request module module plugins plugin (any type)

Comments

@bluikko
Copy link
Contributor

bluikko commented May 13, 2024

Summary

In module ansible_galaxy_install there is no update functionality, there is only force: true option that will report changed to all collections even if they were not updated. This probably also applies to roles and not only collections.

There should be a way to update collections and report only updated collections as changed: true.
This was easy to accomplish using ansible-galaxy command and a simple changed_when.

In essence the module ansible_galaxy_install is less usable than the ansible-galaxy command.

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 module module plugins plugin (any type) labels May 13, 2024
@russoz
Copy link
Collaborator

russoz commented May 25, 2024

Hi @bluikko sorry for taking this long.

Thanks for your suggestion!
You are correct, the module does not have that functionality. When this was first implemented we had to keep compatibility with Ansible 2.9, and the -U (upgrade) option only came out in ansible-core 2.11.

I will try and add the upgrade in the next couple of days, but while looking into the module I found some refactors to make, I need those to be merged before I make more changes. Watch this space.

@russoz
Copy link
Collaborator

russoz commented May 26, 2024

BTW, the ansible-galaxy role install command does not have the -U option, so no, it does not apply to roles as well.

@bluikko
Copy link
Contributor Author

bluikko commented May 27, 2024

sorry for taking this long

Appreciate this even though I had absolutely zero expectations for any of this.

When this was first implemented we had to keep compatibility with Ansible 2.9, and the -U (upgrade) option only came out in ansible-core 2.11.

I see, that does make sense.

Thank you for your time!

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 module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants