Skip to content

Instantly share code, notes, and snippets.

@mdkent
Created December 4, 2009 22:42
Show Gist options
  • Save mdkent/249425 to your computer and use it in GitHub Desktop.
Save mdkent/249425 to your computer and use it in GitHub Desktop.
ips = {}
ips[:internal] = node[:ipaddress]
if node[:network][:interfaces].include?("eth1")
eth = node[:network][:interfaces][:eth1][:addresses]
eth.each_key do |i|
if eth[i][:family] == "inet"
ips[:external] = i
end
end
else
raise RuntimeError, "This recipe requires an external ip configured on" +
"eth1 or the various listeners will fail."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment