X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fssl%2Fmanifests%2Fservice.pp;h=54a4110d8387162cf3ff47a70e2a6cd3094e9fa5;hb=2d72a6841dae5334c548b4db7ba5dc4fd1da2fc1;hp=9db3b2b2f60855ba105f2abb417d9c15b962f1f5;hpb=1cf55805ae9d1a9cbc8bd935a52d8eea1914f8d4;p=mirror%2Fdsa-puppet.git diff --git a/modules/ssl/manifests/service.pp b/modules/ssl/manifests/service.pp index 9db3b2b2f..54a4110d8 100644 --- a/modules/ssl/manifests/service.pp +++ b/modules/ssl/manifests/service.pp @@ -7,14 +7,23 @@ define ssl::service($ensure = present, $tlsaport = 443, $notify = []) { file { "/etc/ssl/debian/certs/$name.crt": source => "puppet:///modules/ssl/servicecerts/${name}.crt", - notify => [ Exec['c_rehash /etc/ssl/debian/certs'], $notify ], + notify => [ Exec['refresh_debian_hashes'], $notify ], + } + file { "/etc/ssl/debian/certs/$name.crt-chain": + source => [ "puppet:///modules/ssl/chains/${name}.crt", "puppet:///modules/ssl/servicecerts/${name}.crt" ], + notify => [ $notify ], + links => follow, + } + file { "/etc/ssl/debian/certs/$name.crt-chained": + content => template('ssl/chained.erb'), + notify => [ $notify ], } if $tlsaport > 0 { - dnsextras::tlsa_record{ "tlsa-${tlsaport}": - zone => 'debian.org', + dnsextras::tlsa_record{ "tlsa-${name}-${tlsaport}": + zone => 'debian.org', certfile => "/etc/puppet/modules/ssl/files/servicecerts/${name}.crt", - port => $tlsaport, + port => $tlsaport, hostname => "$name", } }