Hi Manoj -
If I am understanding what you are trying to do, I don’t believe that using
:create_if_missing will work for you (which is consistent with what you
My understanding is that you want to do the following:
- Create a .war file that has the same name for every version of the file.
- Only copy the file when there is a new version
++ But that new version will have the same name
Is that correct?
If so, I believe that using
remote_file is your best option. It will
allow you to specify a checksum and will only copy the file if the checksum
matches what you specify.
Alternatively, you could use cookbook_file, but use a conditional that
requires they checksum you calculate is different from what is deployed.
On Thu, Sep 12, 2013 at 1:00 PM, Alan Ivey firstname.lastname@example.org 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
Senior Systems Administrator
phone: 202-285-9455 ext 115
On Thu, Sep 12, 2013 at 2:29 PM, Manoj Thakkar email@example.com:
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,