Skip to content

Commit 0689348

Browse files
authored
Merge pull request #1378 from itshosted/main
Fix: Puppet Unknown variable: 'mysql::params::exec_path'
2 parents bb9e0fc + 5e0a97a commit 0689348

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

manifests/db.pp

+8-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,20 @@
5353
Enum['absent', 'present'] $ensure = 'present',
5454
$import_timeout = 300,
5555
$import_cat_cmd = 'cat',
56-
$mysql_exec_path = $mysql::params::exec_path,
56+
$mysql_exec_path = undef,
5757
) {
5858
$table = "${dbname}.*"
5959

6060
$sql_inputs = join([$sql], ' ')
6161

6262
include 'mysql::client'
6363

64+
if ($mysql_exec_path) {
65+
$_mysql_exec_path = $mysql_exec_path
66+
} else {
67+
$_mysql_exec_path = $mysql::params::exec_path
68+
}
69+
6470
$db_resource = {
6571
ensure => $ensure,
6672
charset => $charset,
@@ -98,7 +104,7 @@
98104
logoutput => true,
99105
environment => "HOME=${::root_home}",
100106
refreshonly => $refresh,
101-
path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:${mysql_exec_path}",
107+
path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:${_mysql_exec_path}",
102108
require => Mysql_grant["${user}@${host}/${table}"],
103109
subscribe => Mysql_database[$dbname],
104110
timeout => $import_timeout,

0 commit comments

Comments
 (0)