[chef] Template attributes - converge time vs. run time


Chronological Thread 
  • From: Michael Glenney < >
  • To:
  • Subject: [chef] Template attributes - converge time vs. run time
  • Date: Wed, 16 Oct 2013 17:16:42 -0700

I noticed when I pass attributes to a template resource via the 'variables' attribute the attributes values are what they are at converge time.  So if I modify those attributes during the chef run, before the template resource get's called, it doesn't matter.  They get rendered as they were at converge time.

The only way around this I've found is to NOT pass the attributes via the 'variables' attribute and instead source them directly in the template.  I don't like doing that.  I like having everything that's being passed to the template defined in the recipe for documentation purposes.

Is there any way around this?  The attribute is correct in memory at the time the template resource is called.  Is there any way to tell it to use the attribute in memory instead of how it was at converge time?  Or am I stuck calling them from within the template?

MG



Archive powered by MHonArc 2.6.16.

§