Restart slapd on TLS cert renew
[mirror/dsa-puppet.git] / modules / roles / manifests / rtc.pp
index c5e9da3..b488e45 100644 (file)
@@ -1,39 +1,21 @@
 class roles::rtc {
 
-       ssl::service { 'www.debian.org':
+       ssl::service { 'debian.org':
+               tlsaport => [],
+               notify  => Service['repro'],
+               key => true,
        }
 
        ssl::service { 'sip-ws.debian.org':
+               notify  => Service['repro'],
+               key => true,
        }
 
-       concat { '/etc/repro/www.debian.org-chained.crt':
-       }
-       concat::fragment { '/etc/ssl/debian/certs/www.debian.org.crt':
-               target      => '/etc/repro/www.debian.org-chained.crt',
-               source      => 'file:///etc/ssl/debian/certs/www.debian.org.crt',
-               order       => 00,
-               require     => File['/etc/ssl/debian/certs/www.debian.org.crt'],
-       }
-       concat::fragment { '/etc/ssl/debian/certs/www.debian.org.crt-chain':
-               target      => '/etc/repro/www.debian.org-chained.crt',
-               source      => 'file:///etc/ssl/debian/certs/www.debian.org.crt-chain',
-               order       => 99,
-               require     => File['/etc/ssl/debian/certs/www.debian.org.crt-chain'],
-       }
-
-       concat { '/etc/repro/sip-ws.debian.org-chained.crt':
-       }
-       concat::fragment { '/etc/ssl/debian/certs/sip-ws.debian.org.crt':
-               target      => '/etc/repro/sip-ws.debian.org-chained.crt',
-               source      => 'file:///etc/ssl/debian/certs/sip-ws.debian.org.crt',
-               order       => 00,
-               require     => File['/etc/ssl/debian/certs/sip-ws.debian.org.crt'],
-       }
-       concat::fragment { '/etc/ssl/debian/certs/sip-ws.debian.org.crt-chain':
-               target      => '/etc/repro/sip-ws.debian.org-chained.crt',
-               source      => 'file:///etc/ssl/debian/certs/sip-ws.debian.org.crt-chain',
-               order       => 99,
-               require     => File['/etc/ssl/debian/certs/sip-ws.debian.org.crt-chain'],
+       dnsextras::tlsa_record{ 'tlsa-xmpp':
+               zone     => 'debian.org',
+               certfile => "/etc/puppet/modules/ssl/files/servicecerts/www.debian.org.crt",
+               port     => [5061, 5222, 5269],
+               hostname => $::fqdn,
        }
 
        @ferm::rule { 'dsa-xmpp-client-ip4':
@@ -109,7 +91,10 @@ class roles::rtc {
        }
 
        file { '/etc/monit/monit.d/50rtc':
-               source  => 'puppet:///modules/roles/rtc/monit',
-               mode    => '0440'
+               ensure  => absent,
+       }
+
+       service { 'repro':
+               ensure  => running,
        }
 }