[chef] Re: Re: cookbok file-- copy only if new


Chronological Thread 
  • From: Alan Ivey < >
  • To:
  • Subject: [chef] Re: Re: cookbok file-- copy only if new
  • Date: Fri, 13 Sep 2013 10:24:26 -0400

Ah, apologies for misunderstanding that part of the question.


On Thu, Sep 12, 2013 at 4:14 PM, Brad Knowles < " target="_blank"> > wrote:
On Sep 12, 2013, at 3:00 PM, Alan Ivey < "> > wrote:

> The :create_if_missing action will only put the file in place if it doesn't already exist.
>
> The .war file can be in the cookbook/files/default/file_name.war. Then, use the action:
>
> cookbook_file "/destination/path/to/file_name.war" do
>   action :create_if_missing"
> end

Yeah, but if there's an old war file that's already there, will it replace that with the new one?

I think the OP wants an "action :create" here, and leave it up to Chef to check the hash signature of the war file to see if it actually needs to be updated or not.

--
Brad Knowles < "> >
LinkedIn Profile: <http://tinyurl.com/y8kpxu>





Archive powered by MHonArc 2.6.16.

§