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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3192 - (show annotations) (download)
Thu May 23 15:10:07 2013 UTC (11 years, 6 months ago) by boklm
File size: 685 byte(s)
sshkeys: fix syntax
1 define sshkeys::create_key (
2 $ensure = "present",
3 $filename = "",
4 $force = false,
5 $keytype = "rsa",
6 $length = 2048,
7 $maxdays = "",
8 $mindate = ""
9 ) {
10 sshkeys::namecheck { "${title}-title": parm => "title", value => $title }
11
12 # apply defaults
13 $_filename = $filename ? { "" => "id_${keytype}", default => $filename }
14 $_length = $keytype ? { "rsa" => $length, "dsa" => 1024 }
15
16 sshkeys::namecheck { "${title}-filename":
17 parm => "filename",
18 value => $_filename,
19 }
20
21 @sshkeys::setup_key_master { $title:
22 ensure => $ensure,
23 force => $force,
24 keytype => $keytype,
25 length => $_length,
26 maxdays => $maxdays,
27 mindate => $mindate,
28 }
29 }

  ViewVC Help
Powered by ViewVC 1.1.30