Create a gist now

Instantly share code, notes, and snippets.

ohai plugin for setting the ipaddress to the eth1. This is particularly useful for running multi-vm vagrant with chef trying to connect the various boxes
provide "ipaddress"
require_plugin "#{os}::network"
network["interfaces"]["eth1"]["addresses"].each do |ip, params|
if params['family'] == ('inet')
ipaddress ip
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment