aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-03-29 19:02:00 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-03-29 19:02:00 -0300
commit587124df88ce58464aa3dd39e7f78fefaa582958 (patch)
treea6e8cfd63fefc718b441b365f81a6f52fb770968
parent7f3d04f5657b2fb1bd3a6e9e7a437f418d5d5285 (diff)
downloadpuppet-ssl-587124df88ce58464aa3dd39e7f78fefaa582958.tar.gz
puppet-ssl-587124df88ce58464aa3dd39e7f78fefaa582958.tar.bz2
Adding file support for ssl-cert-check
-rw-r--r--manifests/init.pp14
1 files changed, 12 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 99e7125..c8d6c0f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -32,9 +32,19 @@ class ssl {
}
define check($port = '443', $interval = '60', $email = 'root',
- $hour = '0', $minute = '0', $weekday = '0') {
+ $hour = '0', $minute = '0', $weekday = '0',
+ $file = false) {
+
+ $ssl_cert_check = "/usr/local/bin/ssl-cert-check -a -q -x ${interval} -e ${email}"
+
+ $command = $file ? {
+ false => "$ssl_cert_check -s ${name} -p ${port}",
+ true => "$ssl_cert_check -c /etc/ssl/certs/cert.crt",
+ default => "$ssl_cert_check -c ${file} -q -x ${interval} -e ${email}",
+ }
+
cron { "ssl-cert-check-${name}":
- command => "/usr/local/bin/ssl-cert-check -a -s ${name} -p ${port} -q -x ${interval} -e ${email}",
+ command => $command,
user => root,
hour => $hour,
minute => $minute,