Skip to content

Instantly share code, notes, and snippets.

@portertech
Created May 25, 2011 09:38
Show Gist options
  • Save portertech/990669 to your computer and use it in GitHub Desktop.
Save portertech/990669 to your computer and use it in GitHub Desktop.
var ip_address = '';
if ("ec2" in attributes['automatic']) {
ip_address = attributes['automatic']['ec2']['public_ipv4'];
} else {
ip_address = attributes['automatic']['ipaddress'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment