Skip to content

Instantly share code, notes, and snippets.

@raphink
Created January 4, 2013 14:51
Show Gist options
  • Save raphink/4453079 to your computer and use it in GitHub Desktop.
Save raphink/4453079 to your computer and use it in GitHub Desktop.
require 'openvz'
inventory = OpenVZ::Inventory.new()
inventory.load
hostnames=[]
inventory.to_hash.each do |k,v|
hostnames << v.config.hostname
end
puts hostnames.join(':')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment