[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Puppet Users] limiting definition variable values Nan Liu Mon Feb 20 14:00:46 2012

On Mon, Feb 20, 2012 at 1:38 PM, Darin Perusich <[EMAIL PROTECTED]> wrote:
> Hello,
> Can you limit the values which might be passed to a definition? I
> haven't been able to find any examples and anything I've tried based
> on reading the docs has been fruitless. I'm creating some templates
> for config files and certainly values are only allowed limited values.
> like ipv4, ipv6, any, etc. I could always add a note saying "see
> manpage for proper values" but I'm just trying to add some sanity
> checks.
> simple example:
> class config (
>     $protocol = "any" or "ipv4" or ipv6"
>     ) { #pass to a template }

See puppetlabs-stdlib validate* functions:




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