Created
March 16, 2012 14:22
-
-
Save turtlebender/2050259 to your computer and use it in GitHub Desktop.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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