diff options
Diffstat (limited to 'manifests/service.pp')
-rw-r--r-- | manifests/service.pp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/service.pp b/manifests/service.pp new file mode 100644 index 0000000..ddc6129 --- /dev/null +++ b/manifests/service.pp @@ -0,0 +1,23 @@ +# @api private +# This class handles the configuration file. Avoid modifying private classes. +class ferm::service { + + # this is a private class + assert_private("You're not supposed to do that!") + + if $ferm::manage_service { + service{'ferm': + ensure => 'running', + enable => true, + } + + # on Ubuntu, we can't start the service, unless we set ENABLED=true in /etc/default/ferm... + if ($facts['os']['name'] == 'Ubuntu') { + file_line{'enable_ferm': + path => '/etc/default/ferm', + line => 'ENABLED="yes"', + match => 'ENABLED=', + } + } + } +} |