summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2021-01-24 15:52:07 +0100
committerJan Dittberner <jandd@cacert.org>2021-01-24 15:52:07 +0100
commit498acd0519920072b3dba82363d2534b90e5f821 (patch)
tree5a2046ab3f7bc5940fa312c831905f15e1a7380f
parent0ad3031e9ba1c4395a00d82a9e0b2b4876cf5d8d (diff)
downloadcacert-puppet-master.tar.gz
cacert-puppet-master.tar.xz
cacert-puppet-master.zip
Install command configuration on extmonHEADmaster
-rw-r--r--sitemodules/profiles/files/icinga2_external_commands/external-commands.conf23
-rw-r--r--sitemodules/profiles/manifests/icinga2_external_commands.pp11
2 files changed, 34 insertions, 0 deletions
diff --git a/sitemodules/profiles/files/icinga2_external_commands/external-commands.conf b/sitemodules/profiles/files/icinga2_external_commands/external-commands.conf
new file mode 100644
index 0000000..3e5c38f
--- /dev/null
+++ b/sitemodules/profiles/files/icinga2_external_commands/external-commands.conf
@@ -0,0 +1,23 @@
+/*
+* External commands, managed by Puppet.
+*
+* vim: filetype=icinga2
+*/
+object CheckCommand "ocsp" {
+ command = [ "/usr/local/lib/nagios/plugins/check_ocsp" ]
+
+ arguments = {
+ "-r" = {
+ value = "$ocsp_responder$"
+ description = "OCSP responder URL that should be checked"
+ }
+ "-s" = {
+ value = "$ocsp_serial$"
+ description = "serial number to check"
+ }
+ "-c" = {
+ value = "$ocsp_class$"
+ description = "certificate class to check (class1 or class3)"
+ }
+ }
+}
diff --git a/sitemodules/profiles/manifests/icinga2_external_commands.pp b/sitemodules/profiles/manifests/icinga2_external_commands.pp
index 9a3c468..e0eb7c7 100644
--- a/sitemodules/profiles/manifests/icinga2_external_commands.pp
+++ b/sitemodules/profiles/manifests/icinga2_external_commands.pp
@@ -41,4 +41,15 @@ class profiles::icinga2_external_commands {
source => 'puppet:///modules/profiles/icinga2_external_commands/check_ocsp',
require => Package['ca-cacert'],
}
+
+ include ::icinga2
+
+ file { '/etc/icinga2/conf.d/external-commands.conf':
+ ensure => 'file',
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ source => 'puppet:///modules/profiles/icinga2_external_commands/external-commands.conf',
+ tag => 'icinga2::config::file',
+ }
}