[chef] Simple command to get node info when logged in on node through SSH


Chronological Thread 
  • From: Maxime Brugidou < >
  • To:
  • Subject: [chef] Simple command to get node info when logged in on node through SSH
  • Date: Wed, 19 Jun 2013 09:28:38 +0200

Ohai all,

This is a simple question, we have many many nodes with various names and we make the node name match the FQDN with a pretty standard naming convention.

However when logged in on a machine it is very very useful to know what's its Chef state. Currently multiple possibilities:

* Use the motd cookbook that will give you some last run static info when you login
* Use a command like knife node show $(hostname -f) -c /etc/chef/client.rb -u $(hostname -f)

I like the command (because it's very flexible) but I'd expect it to be simpler, I know i can do a simple alias, deploy a simple script on my nodes or anything, but this has to be something that other people need right ?

So if we go the knife way, here are my suggestions:
* Why not make knife look for a client.rb file in /etc/chef/client.rb if no configuration is available?
* Why do i have to specify the node_name conf through -u option? it should be default if none available
* Why not make knife node show without arguments show the current node if any ?

Please enlighten me if you know a better way (or if you don't care).

Cheers,
Maxime



Archive powered by MHonArc 2.6.16.

§