[chef] Using Tags for Knife Attributes


Chronological Thread 
  • From: Sheppy Reno < >
  • To: " " < >
  • Subject: [chef] Using Tags for Knife Attributes
  • Date: Sat, 26 Jul 2014 02:17:18 +0000
  • Accept-language: en-US

In our environment, all of the servers live behind a firewall and chef
registers their private IP as the 'IP' attribute of the node.
Unfortunately, our workstations are on a separate network, so we need to
use the external IPs to SSH into the server.  We have been storing the
external IP as a tag attribute and manually running `ssh 

'sudo chef-client`, but this can be cumbersome when working with
multiple nodes.

I have been trying to get `knife ssh` to read the 'Tags' attribute like
so:

knife ssh name:foo* 'sudo chef-client' -a 'Tags'

The Tags variable appears to be an array, but no amount of fiddling with
the syntax has netted me the results I'm looking for.  I even went so
far as to remove all of the tags except the IP, but that didn't work
either.

Has anyone gotten this to work, and if so what sort of hocus pocus did
you do to create this magic?

Thanks,
Sheppy R



Archive powered by MHonArc 2.6.16.

§