From 2f29af86b18f40bd4d62f108536e618ac64a59a0 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 25 Aug 2013 10:46:46 +0100 Subject: [PATCH] set up new certs Signed-off-by: Stephen Gran --- modules/ssl/manifests/init.pp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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, } -- 2.20.1