[chef] ec2 attributes


Chronological Thread 
  • From: José Guilherme Vanz < >
  • To: " " < >
  • Subject: [chef] ec2 attributes
  • Date: Thu, 16 Apr 2015 11:09:58 +0000

Hi

I'm configuring an AWS auto scaling group in my infrastructure. Now, I am writing a script to install and configure chef-client in the ec2 instances launched automatically.

When I run the chef-client first time, it find my recipes and try to run them. Some of the recipes uses attributes from ec2 (e.g. node['ec2']['instance_id'] ). But this attribute does not exist in the instance. Some guy s in the irc channel told me to rerun ohai to reload the attributes. For this, I added the following code in the recipe:

https://gist.github.com/jvanz/d8b73de8a0d4457e11e7

But the problem persists. Is This what I should do?



Archive powered by MHonArc 2.6.16.

§