]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
disable rule caching on ubuntu
authorTim Meusel <tim@bastelfreak.de>
Wed, 11 Jul 2018 08:46:23 +0000 (10:46 +0200)
committerTim Meusel <tim@bastelfreak.de>
Wed, 11 Jul 2018 08:46:23 +0000 (10:46 +0200)
Fixes #16. Ubuntu caches rules. This doesn't allow us to reload the
daemon and to apply new rules. Also this is a ubuntu only feature, it
works well on all other platforms without cache.

manifests/service.pp
spec/classes/ferm_spec.rb

index ddc61297f7f6402ea351a0409714e6967078ad39..f19997fe7f32ab18b3fb0dc4289b4b619163ba1b 100644 (file)
@@ -18,6 +18,11 @@ class ferm::service {
         line  => 'ENABLED="yes"',
         match => 'ENABLED=',
       }
+      file_line{'disable_ferm_cache':
+        path  => '/etc/default/ferm',
+        line  => 'CACHE="no"',
+        match => 'CACHE=',
+      }
     }
   }
 }
index dbf9cbd8cded5b46e7aeb27da7789bc802ef0005..0312adc118f77448ce70edfd92b8ee4ead65732d 100644 (file)
@@ -33,6 +33,7 @@ describe 'ferm' do
         it { is_expected.to contain_service('ferm') }
         if facts[:os]['name'] == "Ubuntu"
           it { is_expected.to contain_file_line('enable_ferm') }
+          it { is_expected.to contain_file_line('disable_ferm_cache') }
         end
       end
       context 'with managed configfile' do