-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Don't --force
install collections
#1231
Conversation
I don't agree, that's not how galaxy works, unfortunately... If you want to make any change to installed roles/collections, you must use |
If you have a
If I then specify a version for a single collection, ansible-galaxy triggers the install of the specified version:
|
I think this discussion needs to be separated into roles and collections. For collections there is a My suggestion is to replace the |
I agree with this. |
services/tasks/runner.go
Outdated
@@ -519,6 +519,7 @@ func (t *TaskRunner) installCollectionsRequirements() error { | |||
"install", | |||
"-r", | |||
requirementsFilePath, | |||
"--update", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be '--upgrade' not '--update'!
Unlike Ansible Galaxy roles, collections do not require `--force` in order to install/update alternative versions. If users require specific versions this can be specified in the associated requirements files which would trigger a download as needed.
--force
install Galaxy requirements--force
install collections
@NiceRath Thanks! After some extended use, personally I don't want the globally installed collections to be upgraded on every run as this causes a lot of churn and API calls to Ansible Galaxy, especially with large and complicated playbooks. Existing Collections should be left alone unless the |
Im my opinion it would make sense that users can configure this behaviour themselfs on repository scope. For example:
|
My goal with this PR was to avoid Ansible Galaxy timeouts with the current behavior. Since I appear to have a unique constraint I'll defer to carrying this as a patch for my own needs as to not interrupt the flow of others. |
Linking to the ansible role update feature proposal (ansible/proposals#23) for completeness. |
If we already have the referenced collections/roles then there is no need to re-download them. If users require specific versions this can be specified in the associated requirements files which would trigger a download as needed.