]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
Ubuntu/Debian: Notify service on config changes
authorTim Meusel <tim@bastelfreak.de>
Wed, 6 May 2020 15:24:06 +0000 (17:24 +0200)
committerTim Meusel <tim@bastelfreak.de>
Wed, 6 May 2020 15:39:17 +0000 (17:39 +0200)
Without this change it's possible that we try to start the service and
afterwards modify the debian/ubuntu specifc config file that otherwise
prevents the service from starting.

manifests/service.pp

index 9cc1373f8c2d2463976e76c680256e2f8e493017..e9eb3696cd36df588d5bf3f0d8cdb079608944a0 100644 (file)
@@ -17,14 +17,16 @@ class ferm::service {
     # on Ubuntu, we can't start the service, unless we set ENABLED=true in /etc/default/ferm...
     if ($facts['os']['name'] in ['Ubuntu', 'Debian']) {
       file_line{'enable_ferm':
-        path  => '/etc/default/ferm',
-        line  => 'ENABLED="yes"',
-        match => 'ENABLED=',
+        path   => '/etc/default/ferm',
+        line   => 'ENABLED="yes"',
+        match  => 'ENABLED=',
+        notify => Service['ferm'],
       }
       file_line{'disable_ferm_cache':
-        path  => '/etc/default/ferm',
-        line  => 'CACHE="no"',
-        match => 'CACHE=',
+        path   => '/etc/default/ferm',
+        line   => 'CACHE="no"',
+        match  => 'CACHE=',
+        notify => Service['ferm'],
       }
     }
   }