[chef] Re: Re: Access to chef environment in Rakefile


Chronological Thread 
  • From: Igor Afonov < >
  • To:
  • Subject: [chef] Re: Re: Access to chef environment in Rakefile
  • Date: Thu, 9 Aug 2012 15:40:35 +0300

Thanks! This is exactly what I need.

-- 
Igor Afonov
Отправлено при помощи Sparrow

четверг, 9 августа 2012 г. в 15:39, Ranjib Dey написал:

sure... you can use the chef api with  your knife config file  to get pretty much everything that you want within your rake task.
 
require  'chef'
Chef::Config.from_file(<path to your knife config>)

Chef::Node.list
Chef::Node.load(<node_name>).attributex 



On Thu, Aug 9, 2012 at 5:44 PM, Igor Afonov < " target="_blank"> > wrote:
Hello,

Is there any way to have an access to chef environment, run search etc. from chef-repo's Rakefile? I've noticed that when I need to access search I'm creating a script which I then run via `knife exec …`. Can I do it somehow directly from Rakefile without shelling-out?





Archive powered by MHonArc 2.6.16.

§