Commit 38097ad Joshua Hoblitt
committed
1 parent 1c81250 commit 38097ad Copy full SHA for 38097ad
File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 44
44
$use_selinux = false ,
45
45
$config = {},
46
46
$config_ldap = {},
47
+ $config_mysql = {},
47
48
$config_pgsql = {},
48
49
) {
49
50
validate_bool($use_selinux )
50
51
validate_hash($config )
51
52
validate_hash($config_ldap )
53
+ validate_hash($config_mysql )
52
54
validate_hash($config_pgsql )
53
55
54
56
include pureftpd::service
73
75
Class[ ' pureftpd::config::ldap' ]
74
76
}
75
77
78
+ if ! empty($config_mysql ) {
79
+ # insert the path to the mysql conf file into pure-ftpd.conf
80
+ $enable_mysql = { mysqlconfigfile => $pureftpd::params::mysql_conf_path }
81
+
82
+ # instantiate a pureftpd::config::mysql that will notify the service class
83
+ $safe_config_mysql = merge($config_mysql ,
84
+ { notify => Class[ ' pureftpd::service' ] }
85
+ )
86
+ create_resources( ' class' ,
87
+ { ' pureftpd::config::mysql' => $safe_config_mysql }
88
+ )
89
+
90
+ # only try to create the mysql configuration file after the pureftpd package
91
+ # is installed and configuration; otherwise the dir may not exist yet
92
+ Class[ ' pureftpd::config' ] ->
93
+ Class[ ' pureftpd::config::mysql' ]
94
+ }
95
+
76
96
if ! empty($config_pgsql ) {
77
97
# insert the path to the pgsql conf file into pure-ftpd.conf
78
98
$enable_pgsql = { pgsqlconfigfile => $pureftpd::params::pgsql_conf_path }
96
116
$config ,
97
117
{ notify => Class[ ' pureftpd::service' ] },
98
118
$enable_ldap ,
119
+ $enable_mysql ,
99
120
$enable_pgsql
100
121
)
101
122
You can’t perform that action at this time.
0 commit comments