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


Chronological Thread 
  • From: Manoj < >
  • To: " " < >
  • Cc: " " < >
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: cookbok file-- copy only if new
  • Date: Fri, 13 Sep 2013 09:50:08 -0700

Thanks for the input

This is what I am seeing on my server 11.4 I have a cookbook_file resource where I am copying a file a-1.1.0-snapshot.war , when I copy a new war file to the cookbook files/default location and run chef client the chef client says uptodate and don't download the file 

Please help me with the proper fix for this 

Sent from my iPhone

On Sep 13, 2013, at 9:31 AM, Daniel DeLeo < "> > wrote:


On Friday, September 13, 2013 at 9:24 AM, Manoj wrote:

I can have the chef client download the artifacts sure but as i said the artifacts name are the same I would not know what's downloaded from repository 
Putting it in the chef server from Jenkins is my way of tracking what I am deploying to chef client , I think it's pretty standard from traceability point of virw to put data in chef server for jenkins 

Are you saying there is no way a cookbook file can do a checksum or see if Ike is modified . I was reading cookbook_fie documentation and it says it does copy file only Fi modified in theory 
All of the file resources are idempotent and will only update a file if it's modified. In the remote_file case, if you are on 11.6+ and your server supports conditional GET, then the file will not be re-downloaded; if you're on an earlier version of chef, the file has to be redownloaded for chef to check if it's changed. You can use the checksum attribute on the resource to avoid this.


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§