From bd35714fff1db0ae3901ea95e82a8f603130bcae Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Tue, 3 Oct 2017 12:42:35 +0200 Subject: [PATCH] Have gobby reload its config when we change its ssl cert --- modules/roles/manifests/init.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 8ccca492c..43dec3283 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -246,13 +246,22 @@ class roles { } if has_role('gobby_debian_org') { - ssl::service { 'gobby.debian.org': notify => Exec['service apache2 reload'], key => true, tlsaport => [443, 6523], } + ssl::service { 'gobby.debian.org': + notify => [ Exec['service apache2 reload'], Exec['reload gobby'] ], + key => true, + tlsaport => [443, 6523], + } file { '/etc/ssl/debian-local/other-keys/gobby.debian.org.key': ensure => present, mode => '0440', group => 'gobby', content => inline_template('<%= File.read(scope().call_function("hiera", ["paths.letsencrypt_dir"]) + "/gobby.debian.org.key") %>'), links => follow, + notify => Exec['reload gobby'], + } + exec { 'reload gobby': + command => 'pkill -u gobby -HUP -x infinoted', + refreshonly => true, } } -- 2.20.1