Issue #18510 has been updated by Kristof Willaert. Status changed from Unreviewed to Closed
Oh boy, this is embarrassing. Just a case of simple shell expansion making me look stupid. So no bug, just PEBKAC. Regards, k ---------------------------------------- Bug #18510: Inconsistent handling of single quoted class/define parameters with dollar signs https://projects.puppetlabs.com/issues/18510#change-81487 Author: Kristof Willaert Status: Closed Priority: Normal Assignee: Category: compiler Target version: Affected Puppet version: 3.0.2 Keywords: Branch: I seem to have run into some undesired behaviour when passing single quoted strings as class parameters, when these contain dollar signs. I do not want these to be expanded, just passed as is to a template, as they are syntax for a configuration file (in casu syslog-ng). When they are passed explicitly, they seem to be interpreted. When passed as default value for the parameter, they are not. The behaviour of defined types is identical. Trivial class example: class bla { $foo = '$MSG foo': notice("foo: ${foo}") } When run with the default values, things are fine: $ puppet apply --modulepath . -e "class { 'bla': } " notice: Scope(Class[Bla]): foo: $MSG foo notice: Finished catalog run in 0.08 seconds When passing the parameter value explicitly, the "variable" is expanded (to an empty string) even though the string is single quoted: $ puppet apply --modulepath . -e "class { 'bla': foo => '$BAR baz' } " notice: Scope(Class[Bla]): foo: baz notice: Finished catalog run in 0.07 seconds Tested on both 2.7.19 and 3.0.2. Is this a bug or just me being dense ? k -- 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.
