diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-03-19 10:20:34 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-03-19 10:20:34 -0300 |
commit | b56d72cd3d8d25eaf473fe223e456e1e4bb50d46 (patch) | |
tree | d01262bd3216929f27a7ad2cc4ecddda158099f9 | |
parent | fa266d8f80542e208943871fce23b1fec6783202 (diff) | |
download | puppet-ssl-feature/certs.tar.gz puppet-ssl-feature/certs.tar.bz2 |
Add main parameter into ssl::certfeature/certs
-rw-r--r-- | manifests/cert.pp | 17 |
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", + } + } } |