Skip to content

Instantly share code, notes, and snippets.

@jcockhren
Created September 18, 2013 09:57
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 jcockhren/6606998 to your computer and use it in GitHub Desktop.
Save jcockhren/6606998 to your computer and use it in GitHub Desktop.
Multi-VM vagrantfile with salt provisioning
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.synced_folder "salt/", "/srv/salt/"
config.vm.define :smaster do |smaster|
smaster.vm.network "private_network", ip: "192.168.50.4"
smaster.vm.network "forwarded_port", guest: 8001, host: 8001, auto_correct: true
smaster.vm.hostname = "devmaster"
smaster.vm.provision :salt do |salt|
salt.install_master = true
#salt.run_highstate = true
salt.verbose = true
salt.master_config = "master"
salt.no_minion = true
end
smaster.vm.provision :shell do |s|
s.inline = "sudo useradd --no-create-home --password 12345678 apiuser && sudo apt-get install salt-api -y"
end
end
config.vm.define :sminion do |sminion|
sminion.vm.network "private_network", ip: "192.168.50.5"
sminion.vm.network "forwarded_port", guest: 22, host: 2224, auto_correct: true
sminion.vm.hostname = "devminion"
sminion.vm.provision :salt do |salt|
salt.run_highstate = true
salt.verbose = true
salt.minion_config = "minion"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment