Open schisamo opened 6 years ago
@schisamo I'll save you all the experimentation I conducted, but it looks like there's a conflict with the package
resource's :upgrade
action when used with the source
property. I was able to replicate this error using apt_package
and package
directly.
Try changing the resource's action to :install
. This worked for me:
chef_ingredient 'automate-1.7' do
product_name 'automate'
version '1.7'
end
chef_ingredient 'automate-1.6' do
product_name 'automate'
version '1.6'
end
@wrightp If we use action :install
instead of action :upgrade
will upgrades still occur when available in the configured channel?
If you are setting package_source
it will always install the specified package.
If you are relying on channel
and version
, mixlib-install will always install a later version if found.
For example:
chef_ingredient 'automate-1.6' do
product_name 'automate'
version '1.6'
end
# installs 1.7.39
chef_ingredient 'automate-latest' do
product_name 'automate'
end
This is just a workaround though as it looks like a bug in chef
Cookbook version
2.1.10
Chef-client version
13.6.2
Platform Details
Ubuntu 16.04
Scenario:
Downgrading a product is throwing: