- From: Sheppy Reno <
>
- To: "
" <
>
- Subject: [chef] Re: Using Tags for Knife Attributes
- Date: Sat, 26 Jul 2014 10:54:31 +0000
- Accept-language: en-US
Wow, after many hours of trying 'Tags' I accidentally type it all lower
case and it magically works, but apparently only when the tag contains
only the public IP. So my follow up to this is how do I pull just one
of the tags when there are multiple?
Thanks again,
Sheppy
On Sat, 2014-07-26 at 02:17 +0000, Sheppy Reno wrote:
>
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.