Reputation: 23
I wanted to copy the files from the host machine to the guest machine with
Vagrant.configure("2") do |config|
# ... other configuration
config.vm.provision "file", source: ".sudoers", destination: "/etc/sudoers"
config.vm.provision "file", source: ".pacman.conf", destination: "/usr/local/etc/pacman.conf"
config.vm.provision "file", source: ".setup.sh", destination: "/home/vagrant/setup.sh"
end
But this doesn't work at all!
When doing vagrant up
no error output is presented to me. The VM provision "file" is right between "Mounting shared folders" and "running provisioner: shell"
If there's any info I can provide I will do that!
Upvotes: 1
Views: 579
Reputation: 1121
Vagrant.configure("2") do |config|
# ... other configuration
config.vm.provision "file", source: "./sudoers", destination: "/etc/sudoers"
config.vm.provision "file", source: "./pacman.conf", destination: "/usr/local/etc/pacman.conf"
config.vm.provision "file", source: "./setup.sh", destination: "/home/vagrant/setup.sh"
end
In your case the error is related to the path of the local files .
I hope that this help you to fix your issue.
Upvotes: 1