- From: Brad Knowles <
>
- To:
- Cc: Brad Knowles <
>
- Subject: [chef] Re: Modifying node run list from within a recipe?
- Date: Tue, 27 Aug 2013 10:06:18 -0500
On Aug 27, 2013, at 9:17 AM, Matt Ray
<
>
wrote:
>
Why not just key off an attribute to decide whether or not to do
>
recipe_includes? Here's an example:
>
https://github.com/opscode-cookbooks/java/blob/master/recipes/default.rb#L21
>
>
You could wrap that in any sort of conditional Ruby logic you want.
In the particular case I have, I'm converting an installation script from
bash to Chef, and part of what the bash script does is adding a role to the
run_list for the node it's running on. So, the Chef recipe(s) in question
would be running as a command-line over-ride for the node, possibly as part
of a chef-solo run, and not part of a normal chef-client run.
So, unless there's something obvious that I'm missing, I don't have a way to
modify the existing Chef recipe(s) for the node to do the kind of thing that
you're suggesting.
Is there a better way to solve this problem?
--
Brad Knowles
<
>
LinkedIn Profile: <
http://tinyurl.com/y8kpxu>
Archive powered by MHonArc 2.6.16.