Fix: Puppet Unknown variable: 'mysql::params::exec_path'#1378
Fix: Puppet Unknown variable: 'mysql::params::exec_path'#1378adrianiurca merged 1 commit intopuppetlabs:mainfrom
Conversation
| $import_cat_cmd = 'cat', | ||
| $mysql_exec_path = $mysql::params::exec_path, | ||
| $mysql_exec_path = undef, | ||
| ) { |
There was a problem hiding this comment.
To fetch all the parameters from mysql::params you should inherit the params class. Use this line to do this:
inherits mysql::params. If you use this you will don't need to verify if $mysql_exec_path is defined or not.
Please try it and let us know if it's working for you
There was a problem hiding this comment.
Here is an example of how to use inheritance in puppet
puppetlabs-mysql/manifests/server.pp
Line 117 in bb9e0fc
There was a problem hiding this comment.
You can't use inherits on a defined type I tried this on https://github.com/puppetlabs/puppetlabs-mysql/pull/1377/files as you can see but the pipeline failed.
There was a problem hiding this comment.
Ohh you're right, please use include mysql::params.
Something like this https://puppet.com/docs/puppet/5.5/lang_defined_types.html#containment
There was a problem hiding this comment.
I did not test this, but do you suggest to reverse my changes and only include the mysql::params ? Is this not already being covered by the include 'mysql::client' as this class is also including the mysql::params?
There was a problem hiding this comment.
Hi @JvGinkel, I tested your changes and it's working! I will proceed to merge this PR.
Thanks for your contributions!
kind regards,
@adrianiurca
| $import_cat_cmd = 'cat', | ||
| $mysql_exec_path = $mysql::params::exec_path, | ||
| $mysql_exec_path = undef, | ||
| ) { |
There was a problem hiding this comment.
Hi @JvGinkel, I tested your changes and it's working! I will proceed to merge this PR.
Thanks for your contributions!
kind regards,
@adrianiurca
No description provided.