On Mon, Feb 20, 2012 at 1:38 PM, Darin Perusich <darin@darins.net>
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:
https://github.com/puppetlabs/puppetlabs-stdlib
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 puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.