I have solved the issue by writing a custom plugin. Right now it is very 
dirty, but it works for me. Hopefully someone can help clean up the code.

https://github.com/jtnw/vagrant-force-rsync




On Friday, February 6, 2015 at 1:14:58 PM UTC-5, Justin Beaty wrote:
>
> Hello,
>
> My vagrantfile uses the host shell plugin and rsync for shared folders, 
> but there is one thing I can't seem to figure out: how to force rsync to 
> happen at certain parts of the vagrantfile.
>
> During vagrant up, I have the host shell plugin build my website. Then, I 
> have a regular shell provisioner attempt to modify those files in the 
> guest. However as rsync only happens at the beginning of vagrant up, the 
> files do not exist on the guest yet.
>
> My first attempt was adding "vagrant rsync" within the host_shell 
> provisioner, but that throws an error because the VM is locked. My second 
> attempt was to modify the vagrant reload plugin (
> https://github.com/aidanns/vagrant-reload) and modify the line:
>
> @machine.action(:reload, options)
>
> to
>
> @machine.action(:rsync, options)
>
> But that didn't seem to work.
>
> How is it possible to call the rsync command at an arbitrary point in the 
> Vagrantfile?
>
> Thanks,
>
> Justin
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to