remote_file chef doesn't understand "file://" in the source

Welcome!

There is a piece of the recipe:
remote_file "test" do
 source "file:///vagrant/data/myfile.rpm"
 action :create
end

When it runs, it turns out to be acceptn:
Connection refused - Connection refused connecting to : for /vagrant/data/myfile.rpm/file:///vagrant/data/myfile.rpm, giving up

I do not understand the strange structure of the URI to search for. If I specify in the source simply "/vagrant/data/myfile.rpm", then conditionally on the fact that URI is in an invalid format, and in the dock to remote_file briefly stated that file:// was adopted.

Yuzayu Chef 11.4.4, the rights to the file -rwxrwxrwx 1 vagrant vagrantto the directory above in the tree drwxr-xr-x 1 vagrant vagrant.

What's wrong?
October 3rd 19 at 02:24
1 answer
October 3rd 19 at 02:26

I do not quite understand what is the meaning of this operation. You need to copy a local file to the remote machine? Or on a remote machine to copy files?

No, just cookbook where this snippet I picked up, asked for the location of the file to get it to work (it downloads in temp folder then). Judging by the interface of this class, can I pass to URI on pre-downloaded to the local machine file. Only this option does not work due to the described error. - Jeffrey.Nikolaus commented on October 3rd 19 at 02:29

Find more questions by tags Chef