diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/server/service.pp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/manifests/server/service.pp b/manifests/server/service.pp index 98bd442..6aa1ef9 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -1,11 +1,15 @@ -class samba::server::service { +class samba::server::service ($ensure = running, $enable = true) { + case $operatingsystem { + centos, redhat: { $service_name = 'smb' } + debian, ubuntu: { $service_name = 'smbd' } + } - service { 'smbd': - ensure => running, + service { "$service_name" : + ensure => $ensure, hasstatus => true, hasrestart => true, - enable => true, + enable => $enable, require => Class['samba::server::config'] } -}
\ No newline at end of file +} |