[chef] Re: Re: Re: Re: Re: Re: Template being updated every chef run


Chronological Thread 
  • From: Tim Smith < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Template being updated every chef run
  • Date: Mon, 15 Oct 2012 16:09:38 +0000
  • Accept-language: en-US

I've had issues in the past with searches that return nodes.  The list of nodes won't come back in the same order every time and the template will write out on every run.  You want to make sure to sort any array of hostnames returned by search.



On Monday, October 15, 2012 at 8:28 AM, Alfredo Palhares wrote:

Excerpts from Daniel Condomitti's message of Mon Oct 15 16:31:05 +0200 2012:
Can you also paste the recipe? Specifically the variables block that's setting @pager. If you're just passing an object (other than a string) its ID would be changing each time (which may be detected as a change in the template to be outputted, I'm not sure how it determines if it has changed) but results in the same output since it's just calling .to_s on it.
That actually makes sense, but i tried to just hardcode the strings, and even just placing it on the
template so it never changes. Still happens.
Do you have another resource in your chef run or external process that is changing the file?

If you create a ruby_block resource to puts %x{ls -halp file} before your template resource, does it say what you expect?

Also, if you use Chef 10.14, you can run with -Fdoc -lfatal and you should see a content diff.

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§