[chef] Re: Re: AWS cookbook and the run list


Chronological Thread 
  • From: Greg Barker < >
  • To: " " < >
  • Subject: [chef] Re: Re: AWS cookbook and the run list
  • Date: Wed, 14 Jan 2015 12:03:39 -0800

Awesome!! Thank you!

On Wed, Jan 14, 2015 at 11:54 AM, Noah Kantrowitz < " target="_blank"> > wrote:

On Jan 14, 2015, at 11:47 AM, Greg Barker < "> > wrote:

> I want to use the AWS cookbook to attach EBS volumes. I wasn't sure what the best way to ensure that it only happens when the node is actually an EC2 instance, and not a local Vagrant VM. Separate roles? Separate environments and use env_run_lists? Is there something like if node['is_ec2']?

Yep, you can do this:

if node['ec2']
  include_recipe 'myebsstuff'
end

--Noah




Archive powered by MHonArc 2.6.16.

§