Issue #3939 has been updated by Daniel Pittman.
Status changed from Accepted to Closed
Michael Stahnke wrote:
> Ok, so the course of action is to not allow ALLCAPS variables in the Puppet
> DSL.
Actually, I think they should be available in the new style in templates:
`⚡ puppet apply -e '$FOO = "bar" notice(inline_template("[<%= @FOO %>]"))'`
The member variable style avoids the collision with Ruby constants.
----------------------------------------
Bug #3939: ALLCAPS variables arent usable in templates.
https://projects.puppetlabs.com/issues/3939
Author: R.I. Pienaar
Status: Closed
Priority: Normal
Assignee:
Category: parser
Target version: Telly
Affected Puppet version: 2.7.9
Keywords:
Branch:
Puppet lets you set all caps variables in the manifest that you couldnt use in
a template:
<pre>
$FOO = "bar"
notice "from puppet: ${FOO}"
notice inline_template("<%= FOO %>")
</pre>
Output is:
<pre>
notice: Scope(Class[main]): from puppet: bar
Failed to parse inline template: uninitialized constant
Puppet::Parser::TemplateWrapper::FOO at /home/rip/test.pp:4 on node
nephilim.ml.org
</pre>
Not sure if you can make the template not handle those as constants, but if not
then the language shouldn't let us make all caps variables.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.