X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fssl%2Fmanifests%2Finit.pp;h=bc4ae9f095159068ea2cec74d1a011b367ca873e;hb=97a0d17a079a0c963bd5301ee1fc76f2d43cd54c;hp=3696eb4561e93f64815d92856d8f19daef9c9d28;hpb=c0b229cbf217abee49528c846f93bbc908e03e0e;p=mirror%2Fdsa-puppet.git diff --git a/modules/ssl/manifests/init.pp b/modules/ssl/manifests/init.pp index 3696eb456..bc4ae9f09 100644 --- a/modules/ssl/manifests/init.pp +++ b/modules/ssl/manifests/init.pp @@ -16,7 +16,7 @@ class ssl { file { '/etc/ssl/servicecerts': ensure => directory, source => 'puppet:///modules/ssl/servicecerts/', - mode => '0644', + mode => '0644', # this works; otherwise all files are +x purge => true, recurse => true, force => true, @@ -25,7 +25,7 @@ class ssl { file { '/etc/ssl/debian': ensure => directory, source => 'puppet:///files/empty/', - mode => '0644', + mode => '0644', # this works; otherwise all files are +x purge => true, recurse => true, force => true, @@ -46,7 +46,7 @@ class ssl { } file { '/etc/ssl/debian/certs/thishost.crt': source => "puppet:///modules/ssl/clientcerts/${::fqdn}.client.crt", - notify => Exec['c_rehash /etc/ssl/debian/certs'], + notify => Exec['refresh_debian_hashes'], } file { '/etc/ssl/debian/keys/thishost.key': source => "puppet:///modules/ssl/clientcerts/${::fqdn}.key", @@ -56,14 +56,14 @@ class ssl { } file { '/etc/ssl/debian/certs/ca.crt': source => 'puppet:///modules/ssl/clientcerts/ca.crt', - notify => Exec['c_rehash /etc/ssl/debian/certs'], + notify => Exec['refresh_debian_hashes'], } file { '/etc/ssl/debian/crls/ca.crl': source => 'puppet:///modules/ssl/clientcerts/ca.crl', } file { '/etc/ssl/debian/certs/thishost-server.crt': source => "puppet:///modules/exim/certs/${::fqdn}.crt", - notify => Exec['c_rehash /etc/ssl/debian/certs'], + notify => Exec['refresh_debian_hashes'], } file { '/etc/ssl/debian/keys/thishost-server.key': source => "puppet:///modules/exim/certs/${::fqdn}.key", @@ -85,12 +85,13 @@ class ssl { notify => Exec['refresh_normal_hashes'], # see NOTE 1 } exec { 'modify_configuration': - command => "sed -i -e 's#!${cacert}#${cacert}' ${caconf}", + command => "sed -i -e 's#!${cacert}#${cacert}#' ${caconf}", onlyif => "grep -Fqx '!${cacert}' ${caconf}", notify => Exec['refresh_normal_hashes'], require => Package['ca-certificates'], } - exec { 'c_rehash /etc/ssl/debian/certs': # refresh_debian_hashes + exec { 'refresh_debian_hashes': + command => 'c_rehash /etc/ssl/debian/certs', refreshonly => true, require => Package['openssl'], }