Have you ever wanted to have a Vagrant workspace with more than one Virtual Machine, and managed by Salt Stack? I did, but the documentation is not all there yet.
I managed to make it work with the following, hope it will be useful.
See the Complete salty-vagrant setup, but use the current Vagrantfile
to have two machines.
Set the following files in your workspace, at the root of your web development project.
projectDir/Vagrantfile
: TheVagrantfile
from this gistprojectDir/salt/key
: A fewpem
andpub
filesprojectDir/salt/roots
: Checkout a few salt states as neededprojectDir/master
: Salt master config, generally default doprojectDir/minion
: Salt minion config, if master is calledsalt
, no need to edit.
You need to remove the synched folder configuration to /etc/salt/keys:
salt.vm.synced_folder "salt/key/", "/etc/salt/keys"
app0.vm.synced_folder "salt/key/", "/etc/salt/keys"
If you leave these options in place, the salt-master installation modifies permissions on /etc/salt/keys which then prevents the minion from being able to access this shared folder (at least for me when using NFS as the shared folder method given all of the issues with VMWare/HGFS synched folders)