Skip to content

Instantly share code, notes, and snippets.

@bmhatfield
Created January 24, 2014 16:24
Show Gist options
  • 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