try thisrc =run_context.duprc.resource_collection = Chef::ResourceCollection.newrc.load_recipe("foo::bar")Chef::Runner.new(rc).converge.. for your case u'll be adding all the recipes,make sure u capture the updated resources. and set the new_resource.updated_by_last_action accordinglyOn Wed, May 29, 2013 at 9:06 AM, Dorian Jaminais < " target="_blank"> > wrote:
Is this a known bug ? I am doing something wrong ?If the LWRP is called more than once, it tells me that the resource has already been added to the run_list even if it has not.Indeed it appears that all recipes included in a LWRP 'run_context.include_recipe' is only really added to the run_list if the LWRP is called once during the run_list.I am still tracking down my problem and I have some news.It appears that he problem is not specific to the git cookbook.
I am failing to find any clues using my google-fu so I am turning to your expertise.
2013/5/29 Dorian Jaminais < " target="_blank"> >
I use this recipe in a variety of other internal cookbooks.The git cookbook is the one available at opscode.I have a LWRP that includes some cookbooks :Hi everyoneI am having trouble with LWRP, include_recipe and roles.
run_context.include_recipe "git"
run_context.include_recipe "internal-cookbook"
run_context.include_recipe "build-essential"
Here is my problem : when I add the cookbooks that use the LWRP directly to a node's run_list, it works perfectly but when I add them via a role, git is not installed. It works for the two other recipes included in the LWRP but not for git.
In the logs I have :
DEBUG: Loading Recipe git via include_recipe
DEBUG: Found recipe default in cookbook git
and then it goes to the next cookbook without the expected
INFO: Processing package[git] action install (base::default line 9)
I am running chef 11.4.4 on ubuntu 12.04 LTS
Do you guys have any ideas what is happening and how to solve this ?
--
Archive powered by MHonArc 2.6.16.