Thanks for the reply. I want to run on 'vargrant up' I realized I needed to add :run => 'always' to make that happen. Now it's running but I am still having issues.
The script creates a file with a here doc but the file does not get created. There is no error on that, but no file. If I run the script by hand the file is created. I have checked and it's not a permission issue. The second issue I have is that I am trying to access a file in a subdir, and I get "No such file or directory" even though the path to the file does exist and is accessible. On Mon, Jul 10, 2017 at 2:13 PM, Alvaro Miranda Aguilera <[email protected]> wrote: > hello > > as long in the same level where your Vagrantfile is, vagrant will copy > setup.sh, set the execute flag and run it. > > inside the VM you can do > > cd /vagrant > sudo ./setup.sh and should have the same effect. > > > > On Fri, Jul 7, 2017 at 2:49 PM, Larry Martell <[email protected]> > wrote: >> >> I have a directory that sometimes is used in a native environment on bare >> metal and other times used in a VM started with vagrant up. The only >> difference is a few config files. What is the accepted way of getting the VM >> version of the config files in place when a vagrant up is run? >> >> I tried running a setup.sh script that uses here docs and sed, but it >> seems like the script does not run. I have this line in my Vagrantfile: >> >> web.vm.provision :shell, :path => "setup.sh" -- 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/CACwCsY47aSuNFzOSYd3NO%2BSssD5GMffu7Gj4h6EBz5QHpuythA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
