/[adm]/puppet/modules/gnupg/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/gnupg/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 962 - (show annotations) (download)
Mon Feb 7 11:44:39 2011 UTC (13 years, 2 months ago) by boklm
File size: 1614 byte(s)
fix syntax
1 class gnupg {
2 class client {
3 package { ["gnupg","rng-utils"]:
4 ensure => present,
5 }
6
7 file { "/usr/local/bin/create_gnupg_keys.sh":
8 ensure => present,
9 owner => root,
10 group => root,
11 mode => 755,
12 content => template('gnupg/create_gnupg_keys.sh')
13 }
14 }
15
16 # debian recommend SHA2, with 4096
17 # http://wiki.debian.org/Keysigning
18 # as they are heavy users of gpg, I will tend
19 # to follow them
20 # however, for testing purpose, 4096 is too strong,
21 # this empty the entropy of my vm
22 define keys( $email,
23 $key_name,
24 $key_type = 'RSA',
25 $key_length = '1024',
26 $expire_date = '1m',
27 $login = 'signbot',
28 $batchdir = '/var/lib/signbot/batches',
29 $keydir = '/var/lib/signbot/keys'
30 ) {
31
32 include gnupg::client
33 file { "$name.batch":
34 ensure => present,
35 path => "$batchdir/$name.batch",
36 content => template("gnupg/batch")
37 }
38
39 file { "$keydir":
40 ensure => directory,
41 owner => $login,
42 mode => 700,
43 }
44
45 file { "$batchdir":
46 ensure => directory,
47 owner => $login,
48 }
49
50 exec { "/usr/local/bin/create_gnupg_keys.sh $batchdir/$name.batch $keydir $batchdir/$name.done":
51 user => $login,
52 creates => "$batchdir/$name.done",
53 require => [File["$keydir"], File["$batchdir/$name.batch"], Package["rng-utils"]],
54 }
55 }
56 }

  ViewVC Help
Powered by ViewVC 1.1.30