- From: Ranjib Dey <
>
- To:
- Subject: [chef] Re: Access to chef environment in Rakefile
- Date: Thu, 9 Aug 2012 18:09:18 +0530
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.