From 5e0a97a64ae8f56817603e119e90ce822a7e2ea8 Mon Sep 17 00:00:00 2001 From: Jethro van Ginkel Date: Wed, 31 Mar 2021 12:28:40 +0200 Subject: [PATCH] Fix: Puppet Unknown variable: 'mysql::params::exec_path' --- manifests/db.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manifests/db.pp b/manifests/db.pp index 7c154e686..1b8688d91 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -53,7 +53,7 @@ Enum['absent', 'present'] $ensure = 'present', $import_timeout = 300, $import_cat_cmd = 'cat', - $mysql_exec_path = $mysql::params::exec_path, + $mysql_exec_path = undef, ) { $table = "${dbname}.*" @@ -61,6 +61,12 @@ include 'mysql::client' + if ($mysql_exec_path) { + $_mysql_exec_path = $mysql_exec_path + } else { + $_mysql_exec_path = $mysql::params::exec_path + } + $db_resource = { ensure => $ensure, charset => $charset, @@ -98,7 +104,7 @@ logoutput => true, environment => "HOME=${::root_home}", refreshonly => $refresh, - path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:${mysql_exec_path}", + path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:${_mysql_exec_path}", require => Mysql_grant["${user}@${host}/${table}"], subscribe => Mysql_database[$dbname], timeout => $import_timeout,