diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-03-18 18:13:16 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-03-18 18:13:16 -0300 |
commit | e36237cd5a8fb7326c1a5a4eb0b3548be9dca2d9 (patch) | |
tree | d2558e92b74fb7535a5ada11def4dfc55bdace6c /manifests/check.pp | |
parent | 2d81c0893343a701ff10646ce8235a05ac394d74 (diff) | |
download | puppet-ssl-e36237cd5a8fb7326c1a5a4eb0b3548be9dca2d9.tar.gz puppet-ssl-e36237cd5a8fb7326c1a5a4eb0b3548be9dca2d9.tar.bz2 |
Split into separate files
Diffstat (limited to 'manifests/check.pp')
-rw-r--r-- | manifests/check.pp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/manifests/check.pp b/manifests/check.pp new file mode 100644 index 0000000..46030ee --- /dev/null +++ b/manifests/check.pp @@ -0,0 +1,29 @@ +define ssl::check( + $port = '443', + $interval = '60', + $email = 'root', + $hour = '0', + $minute = '0', + $weekday = '0', + $file = false, + $ensure = present, + $base = '/etc/ssl' +) { + $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 ${base}/certs/cert.crt", + default => "$ssl_cert_check -c ${file}", + } + + cron { "ssl-cert-check-${name}": + command => $command, + user => root, + hour => $hour, + minute => $minute, + weekday => $weekday, + ensure => $ensure, + require => File["/usr/local/bin/ssl-cert-check"], + } +} |