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


Chronological Thread 
  • From: Alan Ivey < >
  • To:
  • Subject: [chef] Re: cookbok file-- copy only if new
  • Date: Thu, 12 Sep 2013 16:00:59 -0400

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




--
Alan Ivey


On Thu, Sep 12, 2013 at 2:29 PM, Manoj Thakkar < " target="_blank"> > wrote:
Hi,

This is what i am trying to do, i build my war file and copy it in the chef cookbook files/default folder and then run chef-client on my deployment node assuming it will copy the new file.

My recipe says cookbook file "file_name" ...... , I ma not sure what should i write it in the action statement
As the war file name will always be the same so create or create if missing does not make sense,

Please help.







Archive powered by MHonArc 2.6.16.

§