[chef] Re: resource for copy local file?


Chronological Thread 
  • From: andi abes < >
  • To: " " < >
  • Subject: [chef] Re: resource for copy local file?
  • Date: Tue, 30 Aug 2011 23:11:44 -0400

Add an only_if File.exists to the backup

On Aug 30, 2011, at 23:01, 
" "
 
< >
 wrote:

> I got another problem regarding resource for copy local file.
> eg. Download one file from http server, then backup the file:
>
> remote_file "/httpfile" do
>    source "http://wiki.opscode.com/display/chef/Home";
>    mode "0666"
> end
> file "/httpfile.bak" do
>    content IO.read("/httpfile")
> end
>
> I got error: FATAL: Errno::ENOENT: No such file or directory - /httpfile
>
> This is because /httpfile is non-exist when I start chef-client. How can I 
> copy
> such kind of file?



Archive powered by MHonArc 2.6.16.

§