Run provisioning code before setting up sync folder?
I'm trying to run a couple of shell commands on the vagrant guest before vagrant attempts to install rsync and setup the sync folder.
Any idea if this is possible? I haven't found a way yet.
Posted Jul 25, 2019, 7:16 PM UTC
21
You have many options, first disable the creating synced folders in Vagrantfile, run vagrant up(if you decide to put your synced folder installation configuration in provision script or else, run vagrant --no-provision), run your commands (there is a way to run commands from host in guest machine, depending on your VM OS), now run vagrant reload. And put everything you do in bash script or whatever. I don't know if I explained well but I also don't know where vagrant creates synced folder, if it's default or not, etc.
At the end, I would write a clean script with all the little steps you need to take.