Created
September 18, 2013 09:57
-
-
Save jcockhren/6606998 to your computer and use it in GitHub Desktop.
Multi-VM vagrantfile with salt provisioning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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