This is interesting. What would be the difference between the two methods (lazy vs helper)?On Thursday, October 17, 2013 at 14:08, Daniel DeLeo wrote:
On Wednesday, October 16, 2013 at 5:37 PM, Cassiano Leal wrote:
I believe this http://docs.opscode.com/release_notes.html#lazy-attribute-evaluation is what you’re looking for.On Wednesday, October 16, 2013 at 21:16, Michael Glenney wrote:
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?MGYou can also use template helpers to keep your logic separate from your templates:--Daniel DeLeo
Archive powered by MHonArc 2.6.16.