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

-- 
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/a7508e41-5b64-4b7b-be92-d1ed0dbf15c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to