aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp11
-rw-r--r--manifests/params.pp44
2 files changed, 37 insertions, 18 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 6590f4b..b9ad2f7 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -11,6 +11,13 @@
# Sample Usage:
#
# [Remember: No empty lines between comments and class definition]
-class pureftpd ($auth_type = undef, $config_source = undef, $virtualchroot = false) {
- include pureftpd::params, pureftpd::install, pureftpd::config, pureftpd::service
+class pureftpd (
+ $auth_type = undef,
+ $config_source = undef,
+ $virtualchroot = false
+) {
+ include pureftpd::params
+ include pureftpd::install
+ include pureftpd::config
+ include pureftpd::service
}
diff --git a/manifests/params.pp b/manifests/params.pp
index 911da7e..5b32e18 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -1,22 +1,34 @@
class pureftpd::params {
- case $operatingsystem {
- /(Ubuntu|Debian)/: {
- case $auth_type {
- 'mysql': { $real_auth_type = '-mysql' }
- 'ldap': { $real_auth_type = '-ldap' }
- 'postgresql': { $real_auth_type = '-postgresql' }
- default: { $real_auth_type = '' }
- }
- $package_name = "pure-ftpd${real_auth_type}"
- $config_dir = '/etc/pure-ftpd/'
- $service_name = "pure-ftpd${real_auth_type}"
- $config_default_file = '/etc/default/pure-ftpd-common'
- $config_source = 'debian'
+ case $::osfamily {
+ 'Debian': {
+ case $pureftpd::auth_type {
+ 'mysql': {
+ $real_auth_type = '-mysql'
}
+ 'ldap': {
+ $real_auth_type = '-ldap'
+ }
+ 'postgresql': {
+ $real_auth_type = '-postgresql'
+ }
+ default: {
+ $real_auth_type = ''
+ }
+ }
+ $package_name = "pure-ftpd${real_auth_type}"
+ $config_dir = '/etc/pure-ftpd/'
+ $service_name = "pure-ftpd${real_auth_type}"
+ $config_default_file = '/etc/default/pure-ftpd-common'
+ $config_source = 'debian'
}
+ }
- case $pureftpd::virtualchroot {
- true: { $real_virtualchroot = true }
- default: { $real_virtualchroot = false }
+ case $pureftpd::virtualchroot {
+ true: {
+ $real_virtualchroot = true
+ }
+ default: {
+ $real_virtualchroot = false
}
+ }
}