Node or node

Hi all,

the subject says it already. I am developing a recipe to deploy
backuppc (scheduled to make opensource in the next weeks) and I want
the server to find the clients in the same environment. So in the
test-environment I tried with the server getting its own environment
from node.chef_client.environment and it worked.
Today I did the first deploy to production and that node didn’t have
node.chef_client.environment set (altough chef-client did run a few
times since bootstrapping with the -E-option). So I wonder which one is
the better to use to detect a nodes own environment?

Thanks in advance,

Arnold

On 12/10/12 12:33 PM, Arnold Krille wrote:

Hi all,

the subject says it already. I am developing a recipe to deploy
backuppc (scheduled to make opensource in the next weeks) and I want
the server to find the clients in the same environment. So in the
test-environment I tried with the server getting its own environment
from node.chef_client.environment and it worked.
Today I did the first deploy to production and that node didn't have
node.chef_client.environment set (altough chef-client did run a few
times since bootstrapping with the -E-option). So I wonder which one is
the better to use to detect a nodes own environment?

Thanks in advance,

Arnold

node.chef_environment is going to be the most reliable. Note that I
used the method call syntax since, unlike other node data,
chef_environment is actually a method on the Chef::Node object.

Cheers,

Steven

--
Steven Danna
Systems Engineer, Opscode, Inc
GPG Key: http://stevendanna.github.com/downloads/code/public.key