[chef] Re: Re: notifications / subscribe: different cookbook


Chronological Thread 
  • From: Andrey Brindeyev < >
  • To:
  • Subject: [chef] Re: Re: notifications / subscribe: different cookbook
  • Date: Thu, 24 Jan 2013 16:22:35 -0800

On Thu, Jan 24, 2013 at 3:38 PM, AJ Christensen < " target="_blank"> > wrote:
The resource for the template needs to be created before the service
is instantiated, using that syntax for subscribes.

If you use the newer syntax, this restriction does not apply e.g.;

subscribes :create, "template[#{node['pam_limits']['config']}]",
:immediately # I think this will work

It looks like you're missing the 'include_recipe' that creates the
node['pam_limits']['config'] template, anyway..

Indeed, thanks so much! include_recipe was missing.

Now question about order of execution. How can I guarantee that /etc/security/limits.conf will be rendered before many services which are "consuming" it?

Let's say that I have Oracle DB and Tomcat installed on that host and both of them are needed to fix /etc/security/limits.conf for various options.

If I setup :immediately in subscribe that it's too early. But if I specify :delay than my action (:restart) will be processed as last step during chef-client run.

I actually doesn't need to do anything after limits.conf update, I just need to ensure that no dependent service in various recipes will be run before limits.conf have updated data.

Andrey.



Archive powered by MHonArc 2.6.16.

§