X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=test-vagrant-salt%2FVagrantfile;h=25fbaf34ae2753622e9f377a5344a43309d8598a;hb=2a121065036e2f30e5cec073f234045dcc509571;hp=46c7514fe8278fdf7d4615e19fae6d18c80921f4;hpb=cbf0e0a22ef3a397aca9d2af19ec0b6d85516d88;p=vagrant-mail.git diff --git a/test-vagrant-salt/Vagrantfile b/test-vagrant-salt/Vagrantfile index 46c7514..25fbaf3 100644 --- a/test-vagrant-salt/Vagrantfile +++ b/test-vagrant-salt/Vagrantfile @@ -13,12 +13,17 @@ Vagrant.configure(2) do |config| gateway_config.vm.network "private_network", ip: "192.168.33.2" gateway_config.vm.synced_folder "salt/", "/srv/salt" + # Salt bootstrap needs Python and SSL certificates + gateway_config.vm.provision :shell, + inline: "sudo apt-get -qq update && sudo apt-get install -qqy python ca-certificates" + gateway_config.vm.provision :salt do |salt| salt.minion_config = "saltconfig" salt.install_type = "stable" salt.masterless = true salt.verbose = true salt.colorize = true + salt.run_highstate = true # https://github.com/mitchellh/vagrant/issues/5973#issuecomment-137276605 salt.bootstrap_options = "-F -c /tmp/ -P" end @@ -33,15 +38,22 @@ Vagrant.configure(2) do |config| testvm_config.vm.synced_folder "saltpillar/", "/srv/saltpillar" # Change the default route to the gateway VM - testvm_config.vm.provision "shell", + # The host may need to adjust its firewall to prevent packets between VMs from being NAT'ed: + # iptables -t nat -I POSTROUTING -o 'virbr+' -s 192.168.33.0/24 -j RETURN + testvm_config.vm.provision :shell, inline: "sudo ip route delete default ; sudo ip route add default via 192.168.33.2" + # Salt bootstrap needs SSL certificates + testvm_config.vm.provision :shell, + inline: "sudo apt-get -qq update && sudo apt-get install -qqy ca-certificates" + testvm_config.vm.provision :salt do |salt| salt.minion_config = "saltconfig" salt.install_type = "stable" salt.masterless = true salt.verbose = true salt.colorize = true + salt.run_highstate = true salt.bootstrap_options = "-F -c /tmp/ -P" end end