[chef] Passive recipes


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Passive recipes
  • Date: Wed, 7 Oct 2009 11:31:03 -0700 (PDT)

Is there a way to have recipes that are activated based on the activation
status of other recipes?

For example, if Apache is installed and Collectd is installed, then I want to
run the "apache-collectd" recipe.  But I don't want to force either Apache or
Collectd to be installed, and I don't want one servers' recipe to depend on 
the
other.

Ideally, the two server recipes would have no knowledge of the other, and the
apache-collectd module would know about both. How to do this without forcing
anything to be installed on all servers?

During recipe runtime, the list of recipes is still being built, so I can't
trigger a single resource when both are present.  At resource execution
(convergence), I know all the recipes, but it's unclear how you get a resource
in the right place.

There might be a way to do this with scripts on the server, but that's not a
general solution (and how do I make sure that the script is run after Apache
and Collectd resources are finished?).

-=Dan=-



Archive powered by MHonArc 2.6.16.

§