Skip to content

Instantly share code, notes, and snippets.

@cliffdickerson
Forked from mdkent/gist:162839
Created August 5, 2009 17:31
Show Gist options
  • Save cliffdickerson/162848 to your computer and use it in GitHub Desktop.
Save cliffdickerson/162848 to your computer and use it in GitHub Desktop.
ips = {}
ips[:internal] = node[:ipaddress]
eth = node[:network][:interfaces][:eth1][:addresses]
eth.each_key do |i|
if eth[i][:family] == "inet"
ips[:external] = i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment