chef-ingredient
chef-ingredient copied to clipboard
`chef_ingredient` `:upgrade`should reconfigure the service if the package version changes
Cookbook version
2.1.5
Chef-client version
12.21.3
Platform Details
Ubuntu 16.04 on AWS
Scenario:
chef_ingredient
:upgrade
should reconfigure the service if the package version changes. Without this, the it's impossible to use the resource for this behavior in an idempotent way. You will either have to reconfigure every time the chef client is run or use an external resource to handle notifying the service to restart.
eg:
# not idempotent, always reconfigures
chef_ingredient "server" do
action [:upgrade, :reconfigure]
end
# requires an external execute
execute "chef-server-ctl reconfigure" do
action :nothing
end
chef_ingredient "server" do
action :upgrade
notifies :run, execute['chef-server-ctl reconfigure'], :immediately
end
cc @schisamo @sdelano
Related to this, :upgrade
should trigger a chef-server-ctl upgrade
rather than just a reconfigure, right? I can't seem to get it to do that.
I’m adding the Type: Jump In GitHub label to this issue. This is a great issue for someone to get their feet wet with and we’d love a PR to resolves the issue.