On Thu, Feb 3, 2011 at 7:02 PM, Rich Rauenzahn <[email protected]> wrote:
> We would like to have a default node applied to systems, but also
> trigger a failure so that we notice the system in puppet-dashboard.
>
> At the moment we're doing...
>
> node default {
>   include system_defaults
>   fail("$hostname doesn't have a node to apply to it")
> }
>
> Unfortunately this seems to fail before the system_defaults class can
> be applied to the node (which we want applied every time).   And err()
> doesn't propagate up to the dashboard.

Fail function fails the catalog, and without a catalog the client does
not have anything to apply. This is intended as a big red stop button.
You can use bad exec to generate a message and still provide the
resources in system_defaults class which flags this in dashboard (but
I thought this gets applied to ENC nodes anyhow).

exec { "/bin/echo 'not defined'; exit 1": }

This feels like a kludge, and perhaps the following process is better.

Write a function on the puppetmaster that appends a file on the master
about undefined nodes.
Create a notify resource that's tagged=alertme, and use tagmail
function to email an alert as necessary.

Not sure if anyone else have a more elegant solution.

Thanks,

Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to