Created
April 21, 2014 06:20
-
-
Save 1000k/11133853 to your computer and use it in GitHub Desktop.
Ohai plugin to correct ipaddress specified in Vagrantfile.
This file contains hidden or 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
# see: https://gist.github.com/turtlebender/2050259 | |
# see: http://stackoverflow.com/questions/14518236/vagrant-how-to-get-hostonly-ip-adress-from-within-chef-recipe | |
provide "ipaddress" | |
require_plugin "#{os}::network" | |
ipaddress network['interfaces']['eth1']['addresses'].detect{|k,v| v['family'] == "inet" }.first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment