Skip to content

Instantly share code, notes, and snippets.

@spuder
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spuder/42bd2b7bf0f844ba0d10 to your computer and use it in GitHub Desktop.
Save spuder/42bd2b7bf0f844ba0d10 to your computer and use it in GitHub Desktop.
Vagrant multi-host provisioners
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "../", "/vagrant_data" # Mount directory up a level so puppet module list can find modules
config.vm.synced_folder ".", "/vagrant"
#config.vm.network "forwarded_port", guest: 8080, host: 8080
# config.vm.network :private_network, type: "dhcp"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
end
config.vm.define "sensu-server", autostart: true do |server|
server.vm.box = "ubuntu-12_04-x64-virtualbox_4_2_10-plain"
server.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box"
server.vm.hostname = 'sensu-server'
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = ["vm","/vagrant/tests"]
puppet.manifests_file = "sensu-server.pp"
end
end
config.vm.define "sensu-client", autostart: true do |client|
client.vm.box = "ubuntu-12_04-x64-virtualbox_4_2_10-plain"
client.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box"
client.vm.hostname = 'sensu-client'
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = ["vm","/vagrant/tests"]
puppet.manifests_file = "sensu-client.pp"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment