Reputation: 26402
What is the syntax for specifying paths in a Vagrantfile
on Windows? I want to do something like the following:
Vagrant.configure("2") do |config|
config.vm.provision "file", source: "$VagrantProjectHome/src/000-default.conf", destination: "/etc/apache2/000-default.conf"
...
end
I'm pretty sure the syntax is ruby, and thus the File.join
operator should be in there somewhere; but I don't know how to specify a relative path to my project directory on Windows.
Upvotes: 1
Views: 1105
Reputation: 26402
source: src/000-default.conf
did the trick. It doesn't have any fancy syntax for Windows like most programs on Windows.
However, I couldn't actually copy files into any folders other than /tmp
because of permission errors related to the use of SCP. After they are copied over with SCP to /tmp
, you can use mv
in a shell
provisioner to move it anywhere on the system.
Upvotes: 1