Closed brownmike closed 6 years ago
That certainly seems like a bug.
If you want to open a our to help this fix, that'd be great!
I imagine this cookbook is going to get refactored into custom resources soon, so that should help
Taking a look.
@brownmike
What I see going on is that the vagrant cookbook only supports the :install option. :install for packages is usually distinct from :upgrade. For Installing packages on a mac the vagrant cookbook uses the dmg_package resource which doesn't support :upgrade. So, it's not a bug, the cookbook is acting as expected. :upgrade isn't the default or even a supported option.
It doesn't look horrible to add some code to this cookbook to uninstall vagrant and then install it on a mac. The problems come in with supporting upgrade for all the platforms involved. Upgrade would be sort of nasty, I think, on Windows with the reboots needed.
I'll close this issue in a couple days. If you have a strong need for an upgrade capability we'll accept a PR or an issue requesting the feature. The cookbook doesn't really have a delete or an upgrade action for the vagrant package at the moment. Both actions would be nice, time though.
Thanks, Mark
@MarkGibbons Thanks for the detailed response. Feel free to close this out, I can add some handling in my cookbook for this situation. If it seems generic enough, I may open a PR; but we'll see :)
Closing. A delete and/or upgrade option seems like an obvious extension to make.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Cookbook version
0.9.1
Chef-client version
14.4.56
Platform Details
macOS 10.13.6
Scenario
I'm attempting to upgrade the version of Vagrant installed on the nodes. I was surprised to see that bumping the version number of
default['vagrant']['version']
did nothing.Steps to Reproduce
My attributes file:
My default recipe:
The node I'm running this on is currently running vagrant 2.1.1
Expected Result
I expect vagrant 2.1.4 to be installed
Actual Result
And the version is not updated
Analysis
It looks like the underlying implementation for macOS does not utilize the mechanism for comparing the current running version of vagrant to the requested version.