Skip to content

Commit

Permalink
move *conf file path and erb path selection into pureftpd::params
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Aug 2, 2013
1 parent d178271 commit 5b258e1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
4 changes: 2 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
$ipv6only = false,
) inherits pureftpd::params {

file { "${pureftpd::params::config_dir}/pure-ftpd.conf":
file { $pureftpd::params::conf_path:
ensure => file,
content => template("${module_name}/${::osfamily}/pure-ftpd.conf.erb"),
content => template("${module_name}/${pureftpd::params::conf_erb}"),
owner => 'root',
group => 'root',
mode => '0644',
Expand Down
6 changes: 3 additions & 3 deletions manifests/config_ldap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#
# 5Ub-Z3r0
#
class 'pureftpd::config_ldap' (
class pureftpd::config_ldap (
$ldap_port = '389',
$ldap_usetls = false,
$ldap_server,
Expand All @@ -113,9 +113,9 @@
$ldap_authmethod
) {

file { "${pureftpd::params::config_dir}/pureftpd-ldap.conf":
file { $pureftpd::params::ldap_conf_path:
ensure => file,
content => template("${module_name}/${::osfamily}/pureftpd-ldap.conf.erb"),
content => template("${module_name}/${pureftpd::params::ldap_conf_erb}"),
owner => 'root',
group => 'root',
mode => '0644',
Expand Down
4 changes: 2 additions & 2 deletions manifests/config_mysql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
$motd_file = undef
) {

file { "${pureftpd::params::config_dir}/pureftpd-mysql.conf":
file { $pureftpd::params::mysql_conf_path:
ensure => file,
content => template("${module_name}/${::osfamily}/pureftpd-mysql.conf.erb"),
content => template("${module_name}/${pureftpd::params::mysql_conf_erb}"),
owner => 'root',
group => 'root',
mode => '0644',
Expand Down
4 changes: 2 additions & 2 deletions manifests/config_pgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
$motd_file = undef
) {

file { "${pureftpd::params::config_dir}/pureftpd-pgsql.conf":
file { $pureftpd::params::pgsql_conf_path:
ensure => file,
content => template("${module_name}/${::osfamily}/pureftpd-pgsql.conf.erb"),
content => template("${module_name}/${pureftpd::params::pgsql_conf_erb}"),
owner => 'root',
group => 'root',
mode => '0644',
Expand Down
16 changes: 14 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,20 @@
true => ['pure-ftpd', 'pure-ftpd-selinux'],
default => 'pure-ftpd'
}
$config_dir = '/etc/pure-ftpd'
$service_name = 'pure-ftpd'
$config_dir = '/etc/pure-ftpd'
$service_name = 'pure-ftpd'

$conf_erb = 'redhat/pure-ftpd.conf.erb'
$conf_path = "${config_dir}/pure-ftpd.conf"

$ldap_conf_erb = 'redhat/pureftpd-ldap.conf.erb'
$ldap_conf_path = "${config_dir}/pureftpd-ldap.conf"

$mysql_conf_erb = 'redhat/pureftpd-mysql.conf.erb'
$mysql_conf_path = "${config_dir}/pureftpd-mysql.conf"

$pgsql_conf_erb = 'redhat/pureftpd-pgsql.conf.erb'
$pgsql_conf_path = "${config_dir}/pureftpd-pgsql.conf"
}
default:{
fail ("The module is not available for ${::os_family}")
Expand Down

0 comments on commit 5b258e1

Please sign in to comment.