Provisioning and synced folders

38 views
Skip to first unread message

Edward Dunn

unread,
Aug 13, 2015, 3:51:33 PM8/13/15
to Vagrant
I am trying to run an bootstrap file and share folders in that order with no success.  My bootstrap creates the group and creates the folders I will be using to share so I need it to execute first, the problem is the synced folder command always wants to execute first.

Has any one else run into this issue and if so how did you fix it?

Here is my vagrant file

Vagrant.configure(2) do |config|
    config
.vm.box = "chef/centos-6.6"

    config
.vm.network "private_network", ip: "172.29.195.20"

    config
.vm.provider "virtualbox" do |vb|
        vb
.memory = "2048"
   
end
   
    config
.vm.provision :shell, path: "bootstrap.sh"
   
    config
.vm.synced_folder "Filings/", "/var/local/lib/compscirenderingengine/Filings", owner: "tomcat", group: "tomcat"
    config
.vm.synced_folder "Delivery/", "/var/local/lib/compscirenderingengine/Delivery", owner: "tomcat", group: "tomcat"
   
end


If I omit the synced_folders the bootstrap runs as expected.

Alvaro Miranda Aguilera

unread,
Aug 13, 2015, 8:48:52 PM8/13/15
to vagra...@googlegroups.com
Hello,

You can tell vagrant to configure those shared folder by UID/GID (numbers)

Then later, you can create the users with those same UID/GID and will work.

Check the valid answer here:

http://stackoverflow.com/questions/17966365/vagrant-chicken-and-egg-shared-folder-with-uid-apache-user
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/4534b0cd-cd86-4177-ab40-0e23810966ab%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages