[chef-dev] Re: Re: local file copy resource?


Chronological Thread 
  • From: Bryan McLellan < >
  • To: Noah Kantrowitz < >
  • Cc: Jesse Campbell < >, Chef Dev < >
  • Subject: [chef-dev] Re: Re: local file copy resource?
  • Date: Sat, 8 Dec 2012 22:03:30 -0500


On Sat, Dec 8, 2012 at 6:46 PM, Noah Kantrowitz < " target="_blank"> > wrote:
file "foo" do
  owner "whatever"
  content { ::File.new("other") }
end

That's too complex. "cp foo bar" is easy, we shouldn't have to get into ruby do accomplish that, nor fall back on the execute resource for something this common and simple. 

Thoughts on idempotency?

Copy could check checksums and copy if they differ or perms differ, sort of like cookbook_file.
Move could be only if the source file (path) exists.

Bryan




Archive powered by MHonArc 2.6.16.

§