[chef] Re: Determine inside VPC


Chronological Thread 
  • From: Morgan Blackthorne < >
  • To: " " < >
  • Subject: [chef] Re: Determine inside VPC
  • Date: Mon, 26 Jan 2015 11:44:26 -0800

ISTR that you'll have issues with VPC if you don't have the Ohai hint loaded. That said, the Ohai hint might actually contain exactly what you're looking for to key off of. We run nothing outside of VPC at this point, so I can't help beyond that.

--
~*~ StormeRider ~*~

"Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

On Mon, Jan 26, 2015 at 11:38 AM, Douglas Garstang < " target="_blank"> > wrote:
I'm trying to use ohai to determine if my instance is inside a VPC. There's a key nested down there under node['ec2']['network_interfaces_macs'] when this is the case, called vpc_id, but my ruby is horrible and I'm having trouble fetching it. For reasons I don't understand ohai reports this is a dictionary, but when I attempt to iterate over it inside a chef recipe, it's an array.

Is there an easy/better way to determine in chef if your ec2 instance is inside a VPC?

Doug






Archive powered by MHonArc 2.6.16.

§