opscode-cookbooks/bluepill — pull request #16 by faizk (2013-08-23 07:22:40+00:00)
Title: [COOK-3503] Supporting why-run.

Implementing `why-run` support also causes the
actual actions taken by the LWRP `bluepill_service` to
be reported during a converge:

Assuming we in a `foo` cookbook something like

```ruby
# Keep some foo daemon running - with bluepill

template '/etc/bluepill/foo.pill' do
source 'foo.pill.erb'
notifies :reload, 'bluepill_service[foo]'
end

bluepill_service "foo" do
action [:enable, :load, :start]
end

# we want to restart foo when this file changes.
template '/etc/foo.conf' do
source 'foo.conf.erb'
notifies :restart, 'bluepill_service[foo]'
# bluepill_service[foo] properly restarts if this file changes,
# but this fact isn't clearly reported.
end
```

(without why-run)

$ chef-client -F doc
# .. output ...
Recipe: foo::default
* bluepill_service[foo] action restart
(nothing!)

(with why-run)

$ chef-client -F doc
# .. output ...
Recipe: foo::default
* bluepill_service[foo] action restart
- restart bluepill_service[foo]