-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify params_lookup() to be able to search module::varname #92
base: master
Are you sure you want to change the base?
Conversation
To be able to seach for module::varname, as it is the proposed format in puppet documentation
Up to now I've avoided to add the module::param lookup because it's basically useless: the default hiera lookup in Puppet3 is done in any case, so actually the module::param notation works also with current params_lookup, the only issue being that it can't be merged for a global lookup ( if you have both module::param and param the latter is used). |
Emmm... surely I'm missing something here, but suppose you have this class bla (
somevar = params_lookup( 'somevar')
....
) {} that call to param_lookup() will fall into function_hiera(["#{module_name}_#{var_name}", ''])`. or into function_hiera(["#{var_name}", '']) if arguments[1] == 'global' And the searches with I fail to see where I also remember (blurrily) trying Am I all wrong? |
params_lookup return '' (empty string) if it cannot find a value. but puppet will lookup for ::class::variable before running the params_lookup I really don't understand why params_lookup return an empty string and not undef. |
Hi Al,
This patch adds a few extra lookups as we discussed a while ago, to let current 2.x modules to lookup hiera variables as proposed by puppet standards,
module::varname
.Also, as an extra, I've updated the specs to run OK with rspec 1.0.
Regards, Javier