I had to copy some files to a windows host off of a windows share the other day. To my horror I realized there's no built in option for that:
Is the only solution to this writing a custom helper library that does the file copy? This sounds like core functionality that should exist within remote_file. Am I missing something here or does Chef indeed have no built-in option for a simple file copy off of windows shares?
To get a file from a windows network share using remote_file
, you just have to use the correct URL syntax (which is indeed a bit non-obvious):
remote_file "foo" do
source "file:////server/path/to/file"
path "/path/to/local/file"
end
That way, it works even when when copying stuff from CIFS shares.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With