aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKilian Engelhardt <kilian.engelhardt@gmail.com>2019-04-05 13:31:19 +0200
committerKilian Engelhardt <kilian.engelhardt@gmail.com>2019-04-05 13:41:18 +0200
commit5574d83a4ac6ed53b236b66c80b1701633204ff6 (patch)
tree4a84fc7481a9925bc3ee6fe249bc7e33f63ee36f
parentd665af40e1073f9813236ec911af5afdd6608862 (diff)
downloadpuppet-ferm-5574d83a4ac6ed53b236b66c80b1701633204ff6.tar.gz
puppet-ferm-5574d83a4ac6ed53b236b66c80b1701633204ff6.tar.bz2
add parameter manage_initfile with default false
-rw-r--r--README.md4
-rw-r--r--data/common.yaml1
-rw-r--r--manifests/init.pp4
-rw-r--r--manifests/install.pp12
4 files changed, 16 insertions, 5 deletions
diff --git a/README.md b/README.md
index b4d0705..e05cba5 100644
--- 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
diff --git a/data/common.yaml b/data/common.yaml
index f13dcfa..5ab9171 100644
--- a/data/common.yaml
+++ b/data/common.yaml
@@ -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
diff --git a/manifests/init.pp b/manifests/init.pp
index a8b886d..b70d56d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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,
diff --git a/manifests/install.pp b/manifests/install.pp
index 9ef81e7..548846c 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -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",
+ }
}
}
}