diff options
Diffstat (limited to 'modules/gnupg/manifests')
| -rw-r--r-- | modules/gnupg/manifests/client.pp | 8 | ||||
| -rw-r--r-- | modules/gnupg/manifests/keys.pp | 12 |
2 files changed, 13 insertions, 7 deletions
diff --git a/modules/gnupg/manifests/client.pp b/modules/gnupg/manifests/client.pp index a032b323..301e569a 100644 --- a/modules/gnupg/manifests/client.pp +++ b/modules/gnupg/manifests/client.pp @@ -1,9 +1,15 @@ class gnupg::client { +if versioncmp($::lsbdistrelease, '7') < 0 { package {['gnupg', 'rng-utils']: } +} else { + package {['gnupg2', + 'rng-utils']: + } +} - mga-common::local_script { 'create_gnupg_keys.sh': + mga_common::local_script { 'create_gnupg_keys.sh': content => template('gnupg/create_gnupg_keys.sh') } } diff --git a/modules/gnupg/manifests/keys.pp b/modules/gnupg/manifests/keys.pp index 948619a2..b99ed393 100644 --- a/modules/gnupg/manifests/keys.pp +++ b/modules/gnupg/manifests/keys.pp @@ -1,5 +1,5 @@ # debian recommend SHA2, with 4096 - # http://wiki.debian.org/Keysigning + # https://wiki.debian.org/Keysigning # as they are heavy users of gpg, I will tend # to follow them # however, for testing purpose, 4096 is too strong, @@ -14,8 +14,8 @@ define gnupg::keys($email, $keydir = '/var/lib/signbot/keys') { include gnupg::client - file { "$name.batch": - path => "$batchdir/$name.batch", + file { "${name}.batch": + path => "${batchdir}/${name}.batch", content => template('gnupg/batch') } @@ -30,9 +30,9 @@ define gnupg::keys($email, owner => $login, } - exec { "/usr/local/bin/create_gnupg_keys.sh $batchdir/$name.batch $keydir $batchdir/$name.done": + exec { "/usr/local/bin/create_gnupg_keys.sh ${batchdir}/${name}.batch ${keydir} ${batchdir}/${name}.done": user => $login, - creates => "$batchdir/$name.done", - require => [File[$keydir], File["$batchdir/$name.batch"], Package['rng-utils']], + creates => "${batchdir}/${name}.done", + require => [File[$keydir], File["${batchdir}/${name}.batch"], Package['rng-utils']], } } |
