On Wednesday, October 8, 2014 7:20:52 AM UTC-6, jcbollinger wrote: > > > > On Tuesday, October 7, 2014 9:20:41 AM UTC-5, Grant Schoep wrote: >> >> So I have the following puppet rule. Pasted below. The problem is, >> sometimes, I see it looks like it is running the File before it sets the >> variable $sendmail_file in the case statement above. The reason I believe >> this, is because of the error message that it reports. Which is >> >> Error Message: >> err: /File[sendmailcf]/ensure: change from absent to file failed: Could >> not set 'file on ensure: No such file or directory - >> /etc/mail/sendmail.cf.puppettmp_6850 at >> /etc/puppet/modules/sendmail/manifests/client.pp:40 >> >> What I can't figure out, is how to ensure that that variable gets set, >> before it gets used. Any pointers? >> > > > Puppet evaluates the class body in order, left-to-right, top-to-bottom, so > I think your hypothesis is mistaken. Moreover, your error message does not > seem to agree with your hypothesis: it is about a *local* file on the > node, whereas the only variable in your class controls which 'source' file > to use on the master. (The same principle is in operation even if you're > running in masterless mode.) > > It looks like Puppet wants to update your sendmail.cf. In standard > fashion, it tries to create the new version as a temp file first, which (if > all goes well) it will later move to replace the original file. It is > unable to create the temp file, however, or else something prevents access > to it or removes it again immediately after it is created. Perhaps your > disk is full, but more likely some form of access control is getting in > Puppet's way. > > > John > > Ah, you are right, I was thinking "too complicated" The dependency I was missing was the sendmail package, which created the /etc/mail/ directory. I was thrown off by the "puppettmp_6850" name, thinking that was "junk" from an uninitialized variable.
-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5bcc3b2e-175a-46ba-a49a-033e7b1c543e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
