From 2d355a4c1baadc761d6b12645d0274da8866f722 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 18 Sep 2017 15:23:36 +0200 Subject: initial commit --- manifests/service.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 manifests/service.pp (limited to 'manifests/service.pp') 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=', + } + } + } +} -- cgit v1.2.3