- From: "Fouts, Chris" <
>
- To: "
" <
>
- Subject: [chef] RE: Query node's environment from recipe?
- Date: Fri, 7 Nov 2014 18:39:07 +0000
- Accept-language: en-US
You can do the following on the node to get all its attributes
>
knife node show node_name -l -Fj (that a dash-lowercase-L)
This will show
{
"name": "london-routemanager",
"chef_environment": "arqiva-dev-nslice",
......
}
So now you know the that node.chef_environment will give you the node's
environment
Chris
-----Original Message-----
From: Jeff Blaine
[mailto:
Sent: Friday, November 07, 2014 1:02 PM
To:
Subject: [chef] Query node's environment from recipe?
I'm failing.
How does one determine the current node's Chef environment from within a
recipe?
node['environment'] and node['chef_environment'] do not seem to be the way.
--
Jeff Blaine
kickflop.net
PGP/GnuPG Key ID: 0x0C8EDD02
Archive powered by MHonArc 2.6.16.