diff --git a/psacct/manifests/init.pp b/psacct/manifests/init.pp index 2c91375..09ec195 100644 --- a/psacct/manifests/init.pp +++ b/psacct/manifests/init.pp @@ -3,15 +3,15 @@ # class psacct { - case $operatingsystem { - fedora,centos: { + case $kernel { + linux: { include psacct::linux } openbsd: { include psacct::openbsd } default: { - fail("psacct module not supported in ${operatingsystem}") + fail("psacct module not supported in ${kernel}") } } @@ -23,10 +23,18 @@ class psacct { class psacct::linux { package { "psacct": + name => $operatingsystem ? { + ubuntu => "acct", + default => "psacct", + }, ensure => installed, } service { "psacct": + name => $operatingsystem ? { + ubuntu => "acct", + default => "psacct", + }, ensure => running, enable => true, hasstatus => true,