Skip to content

Commit 5b258e1

Browse files
author
Joshua Hoblitt
committed
move *conf file path and erb path selection into pureftpd::params
1 parent d178271 commit 5b258e1

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

manifests/config.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@
120120
$ipv6only = false,
121121
) inherits pureftpd::params {
122122

123-
file { "${pureftpd::params::config_dir}/pure-ftpd.conf":
123+
file { $pureftpd::params::conf_path:
124124
ensure => file,
125-
content => template("${module_name}/${::osfamily}/pure-ftpd.conf.erb"),
125+
content => template("${module_name}/${pureftpd::params::conf_erb}"),
126126
owner => 'root',
127127
group => 'root',
128128
mode => '0644',

manifests/config_ldap.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
#
103103
# 5Ub-Z3r0
104104
#
105-
class 'pureftpd::config_ldap' (
105+
class pureftpd::config_ldap (
106106
$ldap_port = '389',
107107
$ldap_usetls = false,
108108
$ldap_server,
@@ -113,9 +113,9 @@
113113
$ldap_authmethod
114114
) {
115115

116-
file { "${pureftpd::params::config_dir}/pureftpd-ldap.conf":
116+
file { $pureftpd::params::ldap_conf_path:
117117
ensure => file,
118-
content => template("${module_name}/${::osfamily}/pureftpd-ldap.conf.erb"),
118+
content => template("${module_name}/${pureftpd::params::ldap_conf_erb}"),
119119
owner => 'root',
120120
group => 'root',
121121
mode => '0644',

manifests/config_mysql.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
$motd_file = undef
8484
) {
8585

86-
file { "${pureftpd::params::config_dir}/pureftpd-mysql.conf":
86+
file { $pureftpd::params::mysql_conf_path:
8787
ensure => file,
88-
content => template("${module_name}/${::osfamily}/pureftpd-mysql.conf.erb"),
88+
content => template("${module_name}/${pureftpd::params::mysql_conf_erb}"),
8989
owner => 'root',
9090
group => 'root',
9191
mode => '0644',

manifests/config_pgsql.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
$motd_file = undef
8484
) {
8585

86-
file { "${pureftpd::params::config_dir}/pureftpd-pgsql.conf":
86+
file { $pureftpd::params::pgsql_conf_path:
8787
ensure => file,
88-
content => template("${module_name}/${::osfamily}/pureftpd-pgsql.conf.erb"),
88+
content => template("${module_name}/${pureftpd::params::pgsql_conf_erb}"),
8989
owner => 'root',
9090
group => 'root',
9191
mode => '0644',

manifests/params.pp

+14-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,20 @@
2828
true => ['pure-ftpd', 'pure-ftpd-selinux'],
2929
default => 'pure-ftpd'
3030
}
31-
$config_dir = '/etc/pure-ftpd'
32-
$service_name = 'pure-ftpd'
31+
$config_dir = '/etc/pure-ftpd'
32+
$service_name = 'pure-ftpd'
33+
34+
$conf_erb = 'redhat/pure-ftpd.conf.erb'
35+
$conf_path = "${config_dir}/pure-ftpd.conf"
36+
37+
$ldap_conf_erb = 'redhat/pureftpd-ldap.conf.erb'
38+
$ldap_conf_path = "${config_dir}/pureftpd-ldap.conf"
39+
40+
$mysql_conf_erb = 'redhat/pureftpd-mysql.conf.erb'
41+
$mysql_conf_path = "${config_dir}/pureftpd-mysql.conf"
42+
43+
$pgsql_conf_erb = 'redhat/pureftpd-pgsql.conf.erb'
44+
$pgsql_conf_path = "${config_dir}/pureftpd-pgsql.conf"
3345
}
3446
default:{
3547
fail ("The module is not available for ${::os_family}")

0 commit comments

Comments
 (0)