- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Using remote_file resource within Chef 12 for pulling remote files from shared location to client side.
- Date: Mon, 15 Dec 2014 11:48:20 -0800
On Monday, December 15, 2014 at 11:40 AM,
wrote:
>
>
Hi guys,
>
>
Can you please provide me with the example on how to use headers attribute
>
within remote_file Chef recipe?
>
>
Here what I have and it doesn't seem to work:
>
>
remote_file "c:\test_chef.txt" do
>
source "file:////prodstore/Shares/Engineering/test_chef.txt"
>
headers({"Cookies" => "user=kasjdhfak; pass=sdkjhf" })
>
end
>
Looks like it should be `Cookie` (with no āsā).
http://en.wikipedia.org/wiki/HTTP_cookie
The java cookbook temporarily used remote_file the way you are trying to
(they reverted the change to be compatible with older chef versions, but
AFAIK the code worked). You can look at their example here:
https://github.com/agileorbit-cookbooks/java/blob/bc583dce88de391c1c749b7b74c7fda84aeeedf2/providers/ark.rb#L67-L71
>
>
What I basically need is to make chef-client (windows platform) to pull data
>
from Windows shared repository. In order to not save all data on Chef
>
server.
>
>
Issue I met is that windows shared repo uses authentication and I need
>
ability
>
to provide user/pass for getting anything from that source.
The logs on your server should be helpful for debugging, too.
>
Thank you a lot in advance.
>
Much appreciated.
>
>
Regards,
>
Taras.
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.