Skip to content

Instantly share code, notes, and snippets.

@lee-pai-long
Last active September 5, 2017 13:33
Show Gist options
  • Save lee-pai-long/da9401240476e525145e606234201590 to your computer and use it in GitHub Desktop.
Save lee-pai-long/da9401240476e525145e606234201590 to your computer and use it in GitHub Desktop.
Vagrant mount folder post provisioning

[Vagrant] Post provisioning mount

config.vm.share_folder "ganja", "/test", "/test"
config.vm.provision :shell do |shell|
  shell.inline = "sudo mount -t vboxsf -o uid=`id -u apache`,gid=`id -g apache` test /test"
end

michellh comment

If you omit the guest path, it won't auto-mount. Also, the @dominis workaround is quite good. I think this is rare enough that this is satisfactory for now since this would require significant change. Sorry!

sources: hashicorp/vagrant#936 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment