Jira (PUP-6907) Don't provide $name (and perhaps others) in EPP scope
Title: Message Title Henrik Lindberg commented on PUP-6907 Re: Don't provide $name (and perhaps others) in EPP scope Unfortunately, I think that it has to be a "tricky gotcha", since there are cases where you want to use the meta variables in your template. The "gotcha" here is simply that you have to know that there are meta parameters and what their names are, and in this case you also have to know that a node is a resource (just like everything else) and that it has a wonky mangled name when it defined based on a regexp. There are other tickets about getting rid of the node _expression_, or the idea that node should be represented differently (not a resource). Don't think there will be action on those for quite some time. I am going to close this ticket as a won't do. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6907) Don't provide $name (and perhaps others) in EPP scope
Title: Message Title Josh Cooper updated an issue Puppet / PUP-6907 Don't provide $name (and perhaps others) in EPP scope Change By: Josh Cooper Team: Puppet Developer Support Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6907) Don't provide $name (and perhaps others) in EPP scope
Title: Message Title Alex Jurkiewicz commented on PUP-6907 Re: Don't provide $name (and perhaps others) in EPP scope Yeah, special-casing a scope does sound bad the morning after this bug was filed! I don't have any smart ideas really, just one which is also a special-case but perhaps less so. Create a new scope which either no variables by default or perhaps only facter ones. Other variables (eg globals from ENC) would have to be explicitly loaded. But beyond that, perhaps this simply has to remain a tricky gotcha for new programmers Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6907) Don't provide $name (and perhaps others) in EPP scope
Title: Message Title Henrik Lindberg commented on PUP-6907 Re: Don't provide $name (and perhaps others) in EPP scope The main problem here is that the "node scope" behaves as if "node" is a resource and as such it gets meta parameters. Unsure what would break if we change that (which is what I would really like to change). EPP must get the top scope, and when there is a node, that happens to be node scope (or it would not see the correct set of global variables). We want fewer special cases rather that adding new ones. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6907) Don't provide $name (and perhaps others) in EPP scope
Title: Message Title Alex Jurkiewicz updated an issue Puppet / PUP-6907 Don't provide $name (and perhaps others) in EPP scope Change By: Alex Jurkiewicz Summary: Don't provide $name (and perhaps others) into in EPP scope Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6907) Don't provide $name (and perhaps others) into EPP scope
Title: Message Title Alex Jurkiewicz created an issue Puppet / PUP-6907 Don't provide $name (and perhaps others) into EPP scope Issue Type: Improvement Assignee: Unassigned Components: Language Created: 2016/11/09 3:24 PM Priority: Normal Reporter: Alex Jurkiewicz I was just bitten by some unexpected behaviour. In EPP, $name refers to the node scope name, and resolves to (in our case) __node_regexp__. This was surprising. I was expecting to get the name of the defined type that this EPP template was defined in. This behaviour is documented on https://docs.puppet.com/puppet/latest/reference/lang_template_epp.html A template works like a defined type: It has its own anonymous local scope. The parent scope is set to node scope (or top scope if there’s no node definition). I think this behaviour will bite more users than it will be expected, and so suggest that the scope for EPP templates should omit $name (and possibly other variables ($title?)).