- From: Noah Kantrowitz <
>
- To: Dave Urschatz <
>
- Cc:
- Subject: [chef-dev] Re: get calling recipe
- Date: Mon, 9 Jun 2014 16:58:21 -0700
There is no "calling recipe" per se, all recipes are executed independently
so there isn't a useful call stack if thats what you mean. You can access the
_current_ cookbook/recipe via cookbook_name and recipe_name.
--Noah
On Jun 9, 2014, at 1:38 PM, Dave Urschatz
<
>
wrote:
>
>
Is there a way to get the name of a calling recipe?
>
>
Say cookbook1::recipe-a has:
>
include_recipe "cookbook2::recipe-b"
>
>
Then in cookbook2::recipe-b we have:
>
puts get_calling_recipe.name
>
>
Regards,
>
Dave
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.