From: Stephen Gran Date: Sun, 25 Aug 2013 09:46:46 +0000 (+0100) Subject: set up new certs X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=2f29af86b18f40bd4d62f108536e618ac64a59a0;p=mirror%2Fdsa-puppet.git set up new certs Signed-off-by: Stephen Gran --- diff --git a/modules/ssl/manifests/init.pp b/modules/ssl/manifests/init.pp index 3d37fb866..af909f869 100644 --- a/modules/ssl/manifests/init.pp +++ b/modules/ssl/manifests/init.pp @@ -9,6 +9,16 @@ class ssl { ; } + file { '/etc/ssl/servicecerts': + ensure => directory, + mode => '0755', + purge => true, + recurse => true, + force => true, + source => 'puppet:///modules/ssl/servicecerts/', + notify => Exec['make_new_service_links'] + } + file { '/etc/ssl/debian': ensure => directory, mode => '0755', @@ -60,6 +70,22 @@ class ssl { require => Package['ssl-cert'], } + exec { 'make_new_service_links': + command => 'cp --symbolic-link /etc/ssl/servicecerts/* /etc/ssl/certs', + refreshonly => true, + notify => Exec['cleanup_dead_links'] + } + + exec { 'cleanup_dead_links': + command => 'find /etc/ssl/certs -mindepth 1 -maxdepth 1 -L -type l -delete', + refreshonly => true, + notify => Exec['c_rehash /etc/ssl/certs'] + } + + exec { 'c_rehash /etc/ssl/certs': + refreshonly => true, + } + exec { 'c_rehash /etc/ssl/debian/certs': refreshonly => true, }