-define ssl::service($ensure = present, $tlsaport = 443, $notify = []) {
+define ssl::service($ensure = present, $tlsaport = 443, $notify = [], $key = false) {
$link_target = $ensure ? {
present => link,
absent => absent,
content => template('ssl/chained.erb'),
notify => [ $notify ],
}
+ if $key {
+ file { "/etc/ssl/private/$name.key":
+ mode => '0440',
+ group => 'ssl-cert',
+ source => [ "puppet:///modules/ssl/keys/${name}.crt", "puppet:///modules/ssl/from-letsencrypt/${name}.key" ],
+ notify => [ $notify ],
+ links => follow,
+ }
+ }
if $tlsaport > 0 {
dnsextras::tlsa_record{ "tlsa-${name}-${tlsaport}":