- From: Noah Kantrowitz <
>
- To:
- Subject: [chef] Re: calling knife inside a chef recipe ? or a better solution
- Date: Mon, 10 Feb 2014 15:08:40 -0800
knife search is just a wrapper around the search API endpoint, which you can
use directly within recipe code via
http://docs.opscode.com/essentials_search.html#nodes
--Noah
On Feb 10, 2014, at 3:03 PM, Manoj Thakkar
<
>
wrote:
>
Hi,
>
>
Here is my scenario, i have list of servers in my clusterA , i want to
>
provide that list of servers to a script ,
>
>
the script will then read this list( of servers) and will do some action
>
on a file, basically add/remove entires of those hosts in the file.
>
>
How can i achieve this, i can create this list dynamically using the knife
>
search query from a recipe and then put the output in a file , but i have
>
to have knife installed on all nodes then correct ?
>
>
Or i can run this knife query from outside on the chef server put the
>
output in the cookbook file folder , that also is a process breaker as i
>
have to run it on the server first then do the other stuff .
>
>
>
Is there a better way to handle this scenario , Please advise.
>
>
Thanks
>
Manoj
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.