diff options
author | Dennis Hoppe <github@debian-solutions.de> | 2019-04-05 13:53:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-05 13:53:34 +0200 |
commit | c90a142cdcf32206d1f24f2675a7f06170513d3a (patch) | |
tree | 4a84fc7481a9925bc3ee6fe249bc7e33f63ee36f /manifests | |
parent | f6bbb6a48f853a5557bbe4718228496a7143d664 (diff) | |
parent | 5574d83a4ac6ed53b236b66c80b1701633204ff6 (diff) | |
download | puppet-ferm-c90a142cdcf32206d1f24f2675a7f06170513d3a.tar.gz puppet-ferm-c90a142cdcf32206d1f24f2675a7f06170513d3a.tar.bz2 |
Merge pull request #43 from kBite/add-redhat-init-script
Add RedHat init script
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 4 | ||||
-rw-r--r-- | manifests/install.pp | 10 |
2 files changed, 14 insertions, 0 deletions
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 2834dc3..548846c 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -8,4 +8,14 @@ class ferm::install { package{'ferm': ensure => 'latest', } + + 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", + } + } + } } |