The node needs a 'hint' that it's in EC2. Namely this:mkdir -p /etc/chef/ohai/hintstouch /etc/chef/ohai/hints/ec2.jsonthen run chef-client and ohai will find all ec2 facts.--Peter--On Thu, Apr 16, 2015 at 7:09 AM, José Guilherme Vanz < " target="_blank"> > wrote: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.