aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp18
1 files changed, 9 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index c44f231..642e701 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -14,35 +14,35 @@ class ssl {
}
define cert($ensure = present, $owner = 'root', $group = 'root',
- $pubmode = '644', $privmode = '600') {
- file { "/etc/ssl/certs/$name.crt":
+ $pubmode = '644', $privmode = '600', $base = '/etc/ssl') {
+ file { "${base}/certs/$name.crt":
ensure => $ensure,
owner => $owner,
group => $group,
mode => $pubmode,
source => "puppet:///modules/site-keys/ssl/$name.crt",
- require => File["/etc/ssl/certs"],
+ require => File["${base}/certs"],
}
- file { "/etc/ssl/private/$name.pem":
+ file { "${base}/private/$name.pem":
ensure => $ensure,
owner => $owner,
group => $group,
mode => $privmode,
source => "puppet:///modules/site-keys/ssl/$name.pem",
- require => File["/etc/ssl/private"],
+ require => File["${base}/private"],
}
}
- define check($port = '443', $interval = '60', $email = 'root',
- $hour = '0', $minute = '0', $weekday = '0',
- $file = false, $ensure = present) {
+ define 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 /etc/ssl/certs/cert.crt",
+ true => "$ssl_cert_check -c ${base}/certs/cert.crt",
default => "$ssl_cert_check -c ${file}",
}