- From: Ranjib Dey <
>
- To:
- Cc: "
" <
>
- Subject: [chef] Re: knife/ohai
- Date: Thu, 3 Apr 2014 12:31:47 -0700
you mean the remote node data stored in chef server ? or the local machine's data?
ohai can be invoked directly as:
o = Ohai::System.new ; o.all_plugins ; o[:attr] .
but this will slow down knife loading ,
for the nodes in chef server, it may be wiser to do that logic on a plugin.
Chef::Node.load('foo')[:attr1] ,
as this requires rest/http stuff , which in turn requires chef to to be configured (i.e. knife.rb)... you may be able to do this with sufficient hacks.. but it might be worth discussing what exactly you are trying to do instead, and check if theres a cleaner way to do so
best
ranjib
- [chef] knife/ohai, Julio Lajara, 04/03/2014
- [chef] Re: knife/ohai, Ranjib Dey, 04/03/2014
Archive powered by MHonArc 2.6.16.