summaryrefslogtreecommitdiff
path: root/manifests/service
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2015-10-16 15:38:20 +0200
committermh <mh@immerda.ch>2015-10-16 15:40:17 +0200
commit3a39c6e693a835d98ed382bdc3ce72eac31ea664 (patch)
tree2e58265610ba9319f7ab3a93567ed5717ee97141 /manifests/service
parent9a02e527e1803093e25166cdbac753253909065f (diff)
fetch things over hkps and on every check
Diffstat (limited to 'manifests/service')
-rw-r--r--manifests/service/gpgkey.pp12
1 files changed, 6 insertions, 6 deletions
diff --git a/manifests/service/gpgkey.pp b/manifests/service/gpgkey.pp
index 08b7473..f04352a 100644
--- a/manifests/service/gpgkey.pp
+++ b/manifests/service/gpgkey.pp
@@ -6,8 +6,8 @@ define nagios::service::gpgkey(
){
validate_slength($name,40,40)
require ::nagios::plugins::gpg
- $gpg_home = $nagios::plugins::gpg::gpg_home
- $gpg_keyserver = $nagios::plugins::gpg::keyserver
+ $gpg_home = $nagios::plugins::gpg::gpg_home
+ $gpg_cmd = "gpg --homedir ${gpg_home}"
exec{"manage_key_${name}":
user => nagios,
@@ -20,8 +20,8 @@ define nagios::service::gpgkey(
if $ensure == 'present' {
Exec["manage_key_${name}"]{
- command => "gpg --keyserver ${gpg_keyserver} --homedir ${gpg_home} --recv-keys ${name}",
- unless => "gpg --homedir ${gpg_home} --list-keys ${name}",
+ command => "${gpg_cmd} --keyserver hkps://hkps.pool.sks-keyservers.net --keyserver-options ca-cert-file=${gpg_home}/sks-keyservers.netCA.pem --recv-keys ${name}",
+ unless => "${gpg_cmd} --list-keys ${name}",
before => Nagios::Service["check_gpg_${name}"],
}
@@ -39,8 +39,8 @@ define nagios::service::gpgkey(
}
} else {
Exec["manage_key_${name}"]{
- command => "gpg --batch --homedir ${gpg_home} --delete-key ${name}",
- onlyif => "gpg --homedir ${gpg_home} --list-keys ${name}",
+ command => "${gpg_cmd} --batch --delete-key ${name}",
+ onlyif => "${gpg_cmd} --list-keys ${name}",
require => Nagios::Service["check_gpg_${name}"],
}
}