So what I think I'm trying to do is pretty simple, I need to execute the following in-order:
- Run a script that will install via script VBoxLinuxAdditions.run [this is working when I run it by itself]
- Run my synced_folder provision after the VBoxLinuxAdditions.run have been run [this works too by itself]
However I cannot get them to run in order together
Snippet of my code is below:
config.vm.provision "foo", type: "shell", inline: <<-SHELL mkdir /mnt/iso mount -t iso9660 -o ro /tmp/VBoxGuestAdditions.iso /mnt/iso/ /mnt/iso/VBoxLinuxAdditions.run SHELL config.vm.synced_folder "~/tmp", "/home/vagrant/tmp"
The only problem is that synced_folder runs before the shell provisoner -- I guess that is because of the outer/inner precedence however I have been unable to figure out how to specify that the synched_folder run after "foo". I tried something like this, but no luck:
config.vm.synced_folder "~/tmp", "/home/vagrant/tmp", after: "foo"
I've consulted the docs:
- sync_folder: https://www.vagrantup.com/docs/synced-folders/basic_usage
- provisioners: https://www.vagrantup.com/docs/provisioning/basic_usage