Jira (PUP-6950) scope.function_getparam does not work in ERB templates (future parser)
Title: Message Title Rowan Ruseler commented on PUP-6950 Re: scope.function_getparam does not work in ERB templates (future parser) Henrik Lindberg, thanks once again. What I notice is when I create a scope.lookupvar('foo::server'), it does load the 'server_name'. Kinda confused then why the scope.function_ does not. Or it does, but the servers::information is not yet been evaluated? So I assume that this is what you wrote about 'order of evaluation'. do as little as possible class servers::information has more server(s) then one, so I am unable to do that (well, my knowledge stops here - I can not find any documentation on how to do that). Can I create something like $server_name = "$ {server_id} " within the ERB? That it looks up what specific 'server_id' - foo/foo2/etc and gets the correct value? server { 'foo': ip_address => "127.0.0.1", } server { 'foo2':
Jira (PUP-6950) scope.function_getparam does not work in ERB templates (future parser)
Title: Message Title Rowan Ruseler commented on PUP-6950 Re: scope.function_getparam does not work in ERB templates (future parser) Henrik Lindberg, thanks for the reply. How it works with parser future disabled is that it takes the specific information from another module where I've information stored. Multiple modules cherry pick from this module for the information they need. It makes it easy to manage the server overview of database ips, fingerprints, keys, etc. It is kinda like this: init.pp class foo { include servers::information $server_name = "${server_id}" $server= Servers::Information::Server[$server_name] } servers::information, class servers::information { define server(
Jira (PUP-6950) scope.function_getparam does not work in ERB templates (future parser)
Title: Message Title Rowan Ruseler created an issue Puppet / PUP-6950 scope.function_getparam does not work in ERB templates (future parser) Issue Type: Bug Affects Versions: PUP 3.8.1 Assignee: Unassigned Created: 2016/11/30 7:02 AM Priority: Normal Reporter: Rowan Ruseler Code example template.erb; <%= scope.function_getparam( [@server,'ip_address'] ) %> Within Puppet 3.8, without `parser = future` this functions. With, it does not provide an error. I receive an empty strings in the result instead of expected value. I found, PUP-4328 - and I assume it is kinda resembling the same issue.