[chef] Recipe application does not work because chef_envronment is not defined


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Recipe application does not work because chef_envronment is not defined
  • Date: Wed, 11 Apr 2012 00:20:26 -0700 (PDT)

Hi all,

I have installed chef 0.10.4 and I am testing the application cookbook.

The thing is that executing this cookbookit fails when the recipe
application::java_webapp.rb tries to get the value of the method
chef_environment of the Node Object (node.chef_environment). This is the 
error:

Re-raising exception: ArgumentError - Attribute chef_environment is not
defined!


I have checked the node with knife node edit command and I have seen that the
attribute chef_environment is set to "_default"

***** 
 "chef_environment": "_default",
  "run_list": [
    "recipe[application]",
    "role[my_app]"
  ]
*****

So, I guess the value of the node.chef_environment should be "_default", what
is the problem?

On the other hand, I have tried to modify the environment of this node via
knife by changing the value to "prooduction"  (after creating this environment
in the chef server as it is said in the Usage section of this cookbook ) and 
It
happens two things:
1)The recipe still fails (same error)
2)The chef_environment in the node is changed back to "_default" after 
excution
of the recipe

Any hint?
Best Regards



Archive powered by MHonArc 2.6.16.

§