Sha256: 315ad7a685249f4192f0557f5acd4a6a7c0251be9c4e4289b229b74d49f48693

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

managed_servers = %w( 192.168.10.80 192.168.10.81 192.168.10.82 192.168.10.83)

Vagrant.configure(2) do |config|
  config.orchestrate.filter_managed_commands = true

  # These boxes are defined locally to enable acceptance testing. Spinning up
  # real boxes in the vagrant-spec environment was expensive because it ignored
  # the cache and didn't expose a facility to view the vagrant output as it ran.
  # These machines get spun up in the rake task and then the vagrant-spec tests
  # connect to them by IP address.
  managed_servers.each_with_index do |ip, index|
    config.vm.define "local-#{index + 1}" do |ubuntu|
      # minimize clock skew, since we're using the `date` command to measure
      # clock skew.
      ubuntu.vm.provision :shell, inline: "ntpdate pool.ntp.org"
      ubuntu.vm.box = "ubuntu/trusty64"
      ubuntu.vm.network "private_network", ip: ip
    end
  end

  # These managed boxes connect to the local boxes defined above by ip address.
  managed_servers.each_with_index do |server, index|
    config.vm.define "managed-#{index + 1}" do |managed|
      managed.vm.box = "managed-server-dummy"
      managed.vm.box_url = "./dummy.box"
      managed.ssh.password = "vagrant"
      managed.vm.provider :managed do |provider|
        provider.server = server
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-orchestrate-0.5.1 Vagrantfile
vagrant-orchestrate-0.5.0 Vagrantfile