- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Re: Simple command to get node info when logged in on node through SSH
- Date: Thu, 20 Jun 2013 08:16:09 -0700
On Thursday, June 20, 2013 at 4:41 AM, Maxime Brugidou wrote:
Hi Chirag, knife status has the same problem than knife node show: it does not work "out of the box" when you are logged in on a node. You need to specify the client.rb config, the node name... etc.
The goal is to get the Chef data of the node you are currently logged in.
You could write a `knife exec` script to do what you want. If you're using fqdn node names, you can just shell out to `hostname --fqdn` to get the info and then set it with Chef::Config[:node_name] = output_of_hostname_cmd
http://docs.opscode.com/knife_exec.html
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.