Hello

So Vagrant provison by default runs only once, when the VM is created

so your script can look like:

$script = <<SCRIPT
cp -ap /vagrant/nginx/* /etc/nginx/
chkconfig nginx on
service nginx reload
SCRIPT
Vagrant.configure("2") do |config|
  config.vm.provision "shell", inline: $scriptend


and you put your files in nginx/ directory




On Tue, Aug 29, 2017 at 11:11 PM, James Newton <[email protected]>
wrote:

> On 29 August 2017 at 22:38, Alvaro Miranda Aguilera <[email protected]>
> wrote:
>
>> Shared folder goes from host to guest
>>
>> what you can do is copy the folder out and then mount it on the guest
>>
>> however will be a bit late (after servides start) and you will be need to
>> reload the services after.
>>
>> So you can just copy the files to the location and restart/reload the
>> service in one single script. to keep things simple.
>>
>
> Hello Alvaro,
>
> Thank you for your feedback.
>
> Would it be impertinent to ask what script I could use to copy the files
> from the guest to the host? I am guessing that this would need to be done
> only once, since from that moment on, any changes in the host will be
> carried back to the guest.
>
> Thanks in advance for your insights,
>
> James
>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/CAGNcf%2BHLyHnvFb%3DNjYPLOp0QvMY%
> 3Dbvv3d0_BZsd8f7vk8mjuBw%40mail.gmail.com
> <https://groups.google.com/d/msgid/vagrant-up/CAGNcf%2BHLyHnvFb%3DNjYPLOp0QvMY%3Dbvv3d0_BZsd8f7vk8mjuBw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0exp6Rdwp7WKaU6%3DBeLk9aaXNsJYJB_9kFYZh%2By5x5x0CQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to