Skip to content

Instantly share code, notes, and snippets.

@bmhatfield
Created January 24, 2014 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmhatfield/8600671 to your computer and use it in GitHub Desktop.
Save bmhatfield/8600671 to your computer and use it in GitHub Desktop.
Working Ohai Plugin
require_plugin "#{os}::network"
provides 'ipaddress'
if virtualization['system'] == 'vbox'
network['interfaces']['eth1']['addresses'].each do |ip, params|
if params['family'] == 'inet'
ipaddress ip
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment