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


Chronological Thread 
  • From: Russell Bateman < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: cookbok file-- copy only if new
  • Date: Fri, 13 Sep 2013 13:55:40 -0600

(It's okay, Manoi, there are other, equally new kitchen boys watching these posts attentively.)


On 9/13/2013 1:50 PM, Manoj Thakkar wrote:
" type="cite">
Daniel,Alan,

Help me understand this if i copy a new file to the cookbook , do i need to a cookbook upload also ? or the chef-client will see the new file without the cookbook upload ?

sorry for too many questions and discussions i am new to all this.

Thanks
Manoj



On Fri, Sep 13, 2013 at 9:50 AM, Manoj < " target="_blank"> > wrote:
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 < " target="_blank"> > 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.

§