summaryrefslogtreecommitdiff
path: root/manifests/plugins/gpg.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-01 11:59:10 +0100
committervarac <varacanero@zeromail.org>2016-03-01 11:59:10 +0100
commit53e2db13e5082f09fcee7d34ed83b3dfaef06e52 (patch)
tree3f082b3311d08140e29c9ca730cfa3c8061545a8 /manifests/plugins/gpg.pp
parent70afab799b8cf720cd12bd225c1c2948fd1597ee (diff)
parentc0dee4a2393e23b226e123a427898de94b342141 (diff)
Merge remote-tracking branch 'shared/master' into leap_master
Diffstat (limited to 'manifests/plugins/gpg.pp')
-rw-r--r--manifests/plugins/gpg.pp30
1 files changed, 30 insertions, 0 deletions
diff --git a/manifests/plugins/gpg.pp b/manifests/plugins/gpg.pp
new file mode 100644
index 0000000..a09736a
--- /dev/null
+++ b/manifests/plugins/gpg.pp
@@ -0,0 +1,30 @@
+# check_gpg from
+# https://github.com/lelutin/nagios-plugins/blob/master/check_gpg
+class nagios::plugins::gpg {
+ require ::gpg
+ nagios::plugin{'check_gpg':
+ source => 'nagios/plugins/check_gpg',
+ }
+
+ $gpg_home = '/var/local/nagios_gpg_homedir'
+ file{
+ $gpg_home:
+ ensure => 'directory',
+ owner => nagios,
+ group => nagios,
+ mode => '0600',
+ require => Nagios::Plugin['check_gpg'];
+ "${gpg_home}/sks-keyservers.netCA.pem":
+ source => 'puppet:///modules/nagios/plugin_data/sks-keyservers.netCA.pem',
+ owner => nagios,
+ group => 0,
+ mode => '0400',
+ before => Nagios_command['check_gpg'];
+ }
+ nagios_command {
+ 'check_gpg':
+ command_line => "\$USER1\$/check_gpg --gnupg-homedir ${gpg_home} -w \$ARG1\$ \$ARG2\$",
+ require => Nagios::Plugin['check_gpg'],
+ }
+}
+