lib/chef-workflow/support/vm/vagrant.rb
#
# Provision a group of servers. If successful, returns an array of the ips
# allocated for the group. Ignores incoming arguments.
#
Provision a group of servers. If successful, returns an array of the ips
allocated for the group. Ignores incoming arguments.
Provision a group of servers . If successful returns an array of the ips allocated for the group . Ignores incoming arguments .
def startup(*args)
    IPSupport.singleton.delete_role(name)
    @prison = Vagrant::Prison.new(Dir.mktmpdir, false)
    prison.name = name
    prison.configure do |config|
      config.vm.box_url = VagrantSupport.singleton.box_url
      config.vm.box = VagrantSupport.singleton.box
      number_of_servers.times do |x|
        ip = IPSupport.singleton.unused_ip
        IPSupport.singleton.assign_role_ip(name, ip)
        config.vm.define "#{name}-#{x}" do |this_config|
          this_config.vm.network :hostonly, ip
        end
      end
    end
    prison.construct(:ui_class => ui_class)
    return prison.start ? [ips] : false
  end
def startup ( * args ) IPSupport . singleton . delete_role ( name ) @prison = Vagrant :: Prison . new ( Dir . mktmpdir , false ) prison . name = name prison . configure do | config | config . vm . box_url = VagrantSupport . singleton . box_url config . vm . box = VagrantSupport . singleton . box number_of_servers . times do | x | ip = IPSupport . singleton . unused_ip IPSupport . singleton . assign_role_ip ( name , ip ) config . vm . define "#{name}-#{x}" do | this_config | this_config . vm . network :hostonly , ip end end end prison . construct ( :ui_class => ui_class ) return prison . start ? [ ips ] : false end
Provision a group of servers.
Provision a group of servers .
args
<not_specific>