diff options
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 21 |
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"], + } } } |