Browse Source

style-guide changes

pull/1/head
Steffen Zieger 13 years ago
parent
commit
2e035dc8d4
  1. 11
      manifests/init.pp
  2. 30
      manifests/params.pp

11
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
}

30
manifests/params.pp

@ -1,11 +1,19 @@
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 = '' }
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/'
@ -16,7 +24,11 @@ class pureftpd::params {
}
case $pureftpd::virtualchroot {
true: { $real_virtualchroot = true }
default: { $real_virtualchroot = false }
true: {
$real_virtualchroot = true
}
default: {
$real_virtualchroot = false
}
}
}

Loading…
Cancel
Save