/[adm]/puppet/external/sshkeys/manifests/namecheck.pp
ViewVC logotype

Contents of /puppet/external/sshkeys/manifests/namecheck.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3166 - (show annotations) (download)
Thu May 23 15:06:55 2013 UTC (10 years, 6 months ago) by boklm
File size: 385 byte(s)
Add sshkeys module

Import sshkeys module from git://github.com/boklm/puppet-sshkeys.git
at commit 3fb4c1ee17d983dfa8fbc4ad3eed47e0e5712e30.
1 # Check a name (e.g. key title or filename) for the allowed form
2 define sshkeys::namecheck (
3 $parm,
4 $value
5 ) {
6 if $value !~ /^[A-Za-z0-9]/ {
7 fail("sshkeys::key: $parm '$value' not allowed: must begin with a letter or digit")
8 }
9 if $value !~ /^[A-Za-z0-9_.:@-]+$/ {
10 fail("sshkeys::key: $parm '$value' not allowed: may only contain the characters A-Za-z0-9_.:@-")
11 }
12 }

  ViewVC Help
Powered by ViewVC 1.1.28