aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/params.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-24 14:18:03 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-24 14:18:03 -0300
commit309d5859d9c801218075789fe068869ab49065f5 (patch)
treedc31d7e0e39b48f75475f374d5301bba10c7c64a /manifests/server/params.pp
parent846ed365f19187b50f9aff0c7911b533880398a7 (diff)
parenteb97a2b642499fde7afdb64dfd3e2b7e8c14eacc (diff)
downloadpuppet-samba-309d5859d9c801218075789fe068869ab49065f5.tar.gz
puppet-samba-309d5859d9c801218075789fe068869ab49065f5.tar.bz2
Merge branch 'master' of https://github.com/ajjahn/puppet-samba
Conflicts: manifests/server/service.pp
Diffstat (limited to 'manifests/server/params.pp')
-rw-r--r--manifests/server/params.pp38
1 files changed, 38 insertions, 0 deletions
diff --git a/manifests/server/params.pp b/manifests/server/params.pp
new file mode 100644
index 0000000..be9e01b
--- /dev/null
+++ b/manifests/server/params.pp
@@ -0,0 +1,38 @@
+# == Class samba::server::params
+#
+class samba::server::params {
+ case $::osfamily {
+ 'Redhat': { $service_name = 'smb' }
+ 'Debian': {
+ case $::operatingsystem {
+ 'Debian': {
+ case $::operatingsystemmajrelease {
+ '8' : { $service_name = 'smbd' }
+ default: { $service_name = 'samba' }
+ }
+ }
+ 'Ubuntu': {
+ $service_name = 'smbd'
+ $nmbd_name = 'nmbd'
+ }
+ default: { $service_name = 'samba' }
+ }
+ }
+ 'Gentoo': { $service_name = 'samba' }
+ 'Archlinux': {
+ $service_name = 'smbd'
+ $nmbd_name = 'nmbd'
+ }
+
+ # Currently Gentoo has $::osfamily = "Linux". This should change in
+ # Factor 1.7.0 <http://projects.puppetlabs.com/issues/17029>, so
+ # adding workaround.
+ 'Linux': {
+ case $::operatingsystem {
+ 'Gentoo': { $service_name = 'samba' }
+ default: { fail("${::operatingsystem} is not supported by this module.") }
+ }
+ }
+ default: { fail("${::osfamily} is not supported by this module.") }
+ }
+}