On 12/13/2011 10:33 AM, Alexandre wrote:
> This way, i'll have an error of
> duplicate definition at runtime if someone try to include more than 1
> class
...which can be a little counter-intuitive to the uninitiated, I presume.
If you want to be a little more abusive in terms of puppet style, but
put emphasis on expressive error messages, include this in each class:
if defined(Class["a"]) or defined(Class["b"]) or ... {
fail "including more than on of class a, b, ... is forbidden"
}
Again: This is terrible style, but it'll do the job (and subjectively,
the canary resource strikes me as a bit of a hack itself, too).
Cheers,
Felix
--
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.