- From: Gregoire Seux <
>
- To: <
>
- Subject: [chef] pre-update notifications
- Date: Thu, 22 Aug 2013 14:31:07 +0200
Hello,
I'd like to have pre-update notifications which would be the same as
"notifies" but triggered before resource convergence.
For instance, some packages automatically restart a service during
upgrade and I'd like to downtime the host in supervision _before_
actually starting to upgrade those packages.
Classic notifications would be :
>
package "cassandra" do
>
notifies :run, "execute[downtime host]"
>
end
but notification is triggered _after_ the upgrade so it is not useful
anymore.
I wondered how to do this and came up with a partial solution switching
to why_run temporarily to find wether a given resource (package) will
be updated during convergence.
An example is
https://gist.github.com/kamaradclimber/6306398
which would execute the resource to downtime only if the package will be
upgrade later.
Does anyone has already encountered such need? and fixed it?
--
Grégoire
- [chef] pre-update notifications, Gregoire Seux, 08/22/2013
Archive powered by MHonArc 2.6.16.