aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/cert.pp17
1 files changed, 14 insertions, 3 deletions
diff --git a/manifests/cert.pp b/manifests/cert.pp
index e112817..fa77b8a 100644
--- a/manifests/cert.pp
+++ b/manifests/cert.pp
@@ -6,13 +6,14 @@ define ssl::cert(
$privmode = '600',
$base = '/etc/ssl',
$private = true
+ $main = false,
) {
- file { "${base}/certs/$name.crt":
+ file { "${base}/certs/${name}.crt":
ensure => $ensure,
owner => $owner,
group => $group,
mode => $pubmode,
- source => "puppet:///ssl/$name.crt",
+ source => "puppet:///ssl/${name}.crt",
require => File["${base}/certs"],
}
@@ -23,8 +24,18 @@ define ssl::cert(
group => $group,
mode => $privmode,
backup => false, # Do not backup the private key
- source => "puppet:///ssl/$name.pem",
+ source => "puppet:///ssl/${name}.pem",
require => File["${base}/private"],
}
}
+
+ if ($main == true) {
+ file { "${base}/certs/cert.crt":
+ ensure => "${base}/certs/${name}.crt",
+ }
+
+ file { "${base}/private/cert.pem":
+ ensure => "${base}/private/${name}.pem",
+ }
+ }
}