- From: Adam Durana <
>
- To:
- Subject: [chef] Delay or force rending of template
- Date: Mon, 16 May 2011 11:41:26 -0400
Hi,
I'm attempting to render a template with a variable based on a node attribute. The attribute is an array that's built up across different recipes. What I'm finding is that the rendered template doesn't include all the values in the attribute. It appears that the rendered template only includes the the values that are in the attribute when the template is rendered. So it seems like some values go into the attribute, the template gets rendered, and then the rest of the values get put into the attribute but the template isn't re-rendered. I know all the correct values are making it into the attribute because I see what I'd expect for the attribute when editing the node with knife.
Is there some way to ensure that a template isn't rendered until the end of a Chef client run or to force a template to be re-rendered? I've tried sending create notifications to the template resource, but that doesn't seem to work.
To be specific, I'm working with the sudo cookbook from
https://github.com/opscode/cookbooks/tree/master/sudo and the node attribute I'm building up is the list of users used when rendering the template for /etc/sudoers. So I'm ending up with a /etc/sudoers file that doesn't include all the usernames I've put into the attribute.
Thanks,
Adam
- [chef] Delay or force rending of template, Adam Durana, 05/16/2011
Archive powered by MHonArc 2.6.16.