aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-13 17:49:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-13 17:49:32 -0300
commit272a281618654934882657cc03b42fb6725d00d2 (patch)
tree1dbc4a09b84c90175d33915d703a05cb9cd3adac
parent24ec4f95172efa5e636b8a9057a7cdee00a3d02b (diff)
downloadpuppet-ssl-272a281618654934882657cc03b42fb6725d00d2.tar.gz
puppet-ssl-272a281618654934882657cc03b42fb6725d00d2.tar.bz2
Add private parameter to ssl::cert
-rw-r--r--manifests/init.pp21
1 files changed, 12 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 2cb36e7..f56b8f1 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -14,7 +14,8 @@ class ssl {
}
define cert($ensure = present, $owner = 'root', $group = 'root',
- $pubmode = '644', $privmode = '600', $base = '/etc/ssl') {
+ $pubmode = '644', $privmode = '600', $base = '/etc/ssl',
+ $private = true) {
file { "${base}/certs/$name.crt":
ensure => $ensure,
owner => $owner,
@@ -24,14 +25,16 @@ class ssl {
require => File["${base}/certs"],
}
- file { "${base}/private/$name.pem":
- ensure => $ensure,
- owner => $owner,
- group => $group,
- mode => $privmode,
- backup => false, # Do not backup the private key
- source => "puppet:///modules/site_keys/ssl/$name.pem",
- require => File["${base}/private"],
+ if ($private == true) {
+ file { "${base}/private/$name.pem":
+ ensure => $ensure,
+ owner => $owner,
+ group => $group,
+ mode => $privmode,
+ backup => false, # Do not backup the private key
+ source => "puppet:///modules/site_keys/ssl/$name.pem",
+ require => File["${base}/private"],
+ }
}
}