Created
January 28, 2014 18:25
-
-
Save martinisoft/8673261 to your computer and use it in GitHub Desktop.
Crazy ohai plugin to re-write network address
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
provide "ipaddress" | |
require_plugin "#{os}::network" | |
require_plugin "#{os}::virtualization" | |
if virtualization["system"] == "openvz" | |
network["interfaces"]["venet0:0"]["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