aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-03-19 10:20:34 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-03-19 10:20:34 -0300
commitb56d72cd3d8d25eaf473fe223e456e1e4bb50d46 (patch)
treed01262bd3216929f27a7ad2cc4ecddda158099f9
parentfa266d8f80542e208943871fce23b1fec6783202 (diff)
downloadpuppet-ssl-b56d72cd3d8d25eaf473fe223e456e1e4bb50d46.tar.gz
puppet-ssl-b56d72cd3d8d25eaf473fe223e456e1e4bb50d46.tar.bz2
Add main parameter into ssl::certfeature/certs
-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",
+ }
+ }
}