Have you tried putting the recipe that renders the template last in the run list? Also be sure to set the action on the /etc/sudoers template to :nothing so it doesn't take action until the end of the chef run when all of the :create notifications fire.-Seth
Sent from my iPhoneHi,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
Archive powered by MHonArc 2.6.16.