- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: run_context.include_recipe in a recipe within a role
- Date: Mon, 17 Jun 2013 13:52:08 -0700
On Sunday, June 16, 2013 at 5:34 AM, Dorian Jaminais wrote:
Indeed that is exactly the same issue I had been running into.
For now I use to proposed workaround to include all those recipes from another recipe.
Maybe I should open a ticket on that issue.
2013/6/14 Jesse Campbell
<
" target="_blank">
>
I am using the "application" and "application_java" cookbooks, which include_recipe "tomcat" in the LWRP, and i've brought the same code over to an new cookbook for tomeeplus.
include_recipe is working fine if I only run the LWRP precisely one time.
if i run the LWRP more than one time, the include_recipe gets ignored.
This is the intended behavior of `include_recipe` and I'm certain that lots of people depend on this behavior. If you need to run a set of resources with different parameters, LWRPs are the accepted way to do that.
The use cases presented earlier in this thread for using include recipe within a LWRP are still violations of single responsibility principle in my opinion, but regardless, they only depend on running a recipe once.
Of course, it's all just ruby, so you can whip something up with eval or by dipping into chef internals, but of course you're responsible for whatever dragons that summons.
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.