]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
add parameter manage_initfile with default false
authorKilian Engelhardt <kilian.engelhardt@gmail.com>
Fri, 5 Apr 2019 11:31:19 +0000 (13:31 +0200)
committerKilian Engelhardt <kilian.engelhardt@gmail.com>
Fri, 5 Apr 2019 11:41:18 +0000 (13:41 +0200)
README.md
data/common.yaml
manifests/init.pp
manifests/install.pp

index b4d07052e073e193007d7652a9116d4d7cb23805..e05cba51c41fe9c668a646ea455b27fd77c5e2ef 100644 (file)
--- a/README.md
+++ b/README.md
@@ -95,6 +95,10 @@ The main class has the following parameters:
 
 [Boolean] disable/enable the management of the ferm default config
 
+#### `manage_initfile`
+
+[Boolean] disable/enable the management of the ferm init script for RedHat-based OS
+
 #### `configfile`
 
 [Stdlib::Absolutepath] path to the config file
index f13dcfa6852df9b54a8ce3dd97711164241075bc..5ab917150ae7d293c1ee512e89fde0c1ee415b68 100644 (file)
@@ -1,6 +1,7 @@
 ---
 ferm::manage_service: false
 ferm::manage_configfile: false
+ferm::manage_initfile: false
 ferm::disable_conntrack: false
 ferm::configfile: /etc/ferm.conf
 ferm::input_policy: DROP
index a8b886d7950953c5e49dfd3dc766699953be3bf3..b70d56d643764e75d9ddc7c74b56fbd434b802ef 100644 (file)
@@ -14,6 +14,9 @@
 # @param manage_configfile Disable/Enable the management of the ferm default config
 #   Default value: false
 #   Allowed values: (true|false)
+# @param manage_initfile Disable/Enable the management of the ferm init script for RedHat-based OS
+#   Default value: false
+#   Allowed values: (true|false)
 # @param configfile Path to the config file
 #   Default value: /etc/ferm.conf
 #   Allowed values: Stdlib::Absolutepath
@@ -46,6 +49,7 @@
 class ferm (
   Boolean $manage_service,
   Boolean $manage_configfile,
+  Boolean $manage_initfile,
   Stdlib::Absolutepath $configfile,
   Boolean $disable_conntrack,
   Ferm::Policies $forward_policy,
index 9ef81e724f79ad0eca91d5f68d59fdbacbbcee3a..548846c7c7a490f2038fedcdc85e127cb092c5b2 100644 (file)
@@ -9,11 +9,13 @@ class ferm::install {
     ensure => 'latest',
   }
 
-  if $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'], '6') <= 0 {
-    file{'/etc/init.d/ferm':
-      ensure => 'present',
-      mode   => '0755',
-      source => "puppet:///modules/${module_name}/ferm",
+  if $ferm::manage_initfile {
+    if $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'], '6') <= 0 {
+      file{'/etc/init.d/ferm':
+        ensure => 'present',
+        mode   => '0755',
+        source => "puppet:///modules/${module_name}/ferm",
+      }
     }
   }
 }