From 09bb4b2b4ea57193bab7069a2ecd667a9304d1df Mon Sep 17 00:00:00 2001
From: Fabien COMBERNOUS <fabien.combernous@adullact.org>
Date: Thu, 9 Nov 2023 18:28:28 +0100
Subject: [PATCH] modify serve_config notify service

---
 manifests/init.pp          | 1 +
 spec/classes/cfssl_spec.rb | 1 +
 2 files changed, 2 insertions(+)

diff --git a/manifests/init.pp b/manifests/init.pp
index 7fa2c54..1b60e60 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -177,6 +177,7 @@ class cfssl (
     owner   => $sysuser,
     group   => $sysgroup,
     content => to_json_pretty($serve_config),
+    notify  => Service['cfssl'],
   }
 
   vcsrepo { $_goose_cfssldbmigrate_path:
diff --git a/spec/classes/cfssl_spec.rb b/spec/classes/cfssl_spec.rb
index 04b64b8..ea1af37 100644
--- a/spec/classes/cfssl_spec.rb
+++ b/spec/classes/cfssl_spec.rb
@@ -20,6 +20,7 @@ describe 'cfssl' do
           }
         end
 
+        it { is_expected.to contain_file('/etc/cfssl/serve-config.json').that_notifies('Service[cfssl]') }
         it { is_expected.to compile }
       end
     end
-- 
GitLab