- From: Steffen Gebert <
>
- To:
- Subject: [chef] Notification on template change
- Date: Mon, 13 Feb 2012 20:10:04 +0100
Hi list,
I'm searching for a way to notify another resource, as soon as a template
changed:
template "foo.conf" do
source "foo.conf.erb"
notfies :run, "execute[rebuildConfig]"
end
(see this recipe [1]).
When using the create_if_missing action, it's only created once, but not as
soon as I upload a cookbook with a changed version of the config file.
With the create action, the resource is notified every time (which flushes
caches, regenerates merged config files etc..).
Is there a way in between? Notify, if the old and the new file differ?
Thanks for your help!
Steffen
[1]
https://github.com/StephenKing/chef-cookbook-otrs/blob/master/recipes/default.rb#L175
P.S: It would be great, if one wants to review the OTRS cookbook - it still
has some minor issues (and probably misses some best-practices)
- [chef] Notification on template change, Steffen Gebert, 02/13/2012
Archive powered by MHonArc 2.6.16.