[chef] calling knife inside a chef recipe ? or a better solution


Chronological Thread 
  • From: Manoj Thakkar < >
  • To: " " < >
  • Subject: [chef] calling knife inside a chef recipe ? or a better solution
  • Date: Mon, 10 Feb 2014 15:03:59 -0800

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



Archive powered by MHonArc 2.6.16.

§