Opscode Chef's light-weight resource providers
are awesome. They allow you to compose a more complex resource from simpler resources. The one thing that has always
annoyed me is that you can no longer use notifications to indicate which resources are actually changed or so I
thought. Then along came a post at a
gist by yfeldblum
that demonstrated how to do this.
Of course I wanted to simplify this as almost all of our LWRPs will need this so I converted it into a method that
can be added in the library directory.
Now all the providers can simply use something like the following to define your actions in your provider. This will
propagate notifications if any sub-resources have changed.