Issue #14402 has been reported by Gary Wilson (@earthgecko). ---------------------------------------- Bug #14402: variable interpolation and scope https://projects.puppetlabs.com/issues/14402
Author: Gary Wilson (@earthgecko) Status: Unreviewed Priority: Normal Assignee: Category: Target version: Affected Puppet version: 2.7.14 Keywords: Branch: I am somewhat lost in the changes in variable interpolation, the deprecation of dynamic lookup and the styling guide documentation vs Scope and Puppet documentation (http://docs.puppetlabs.com/guides/scope_and_puppet.html) and Bug #10146: Puppet interpolates variables differently in 2.7.x (https://projects.puppetlabs.com/issues/10146) So with 2.7.x variables should be declared as `"/root/.ssh/${var}"` according to #10146 (to be safe). The following variable worked with dynamic lookup. <pre> file { "/root/.ssh/${ec2_cert}": source => "/opt/keys/controller_keys/${ec2_cert}", </pre> Variables were reworked so not just `$var` but to `${var}` to be safe as #10146. However changing the variables to namespace variables due to dynamic lookup deprecation on 2.7.14 the following does not work. <pre> file { "/root/.ssh/${zpf-controller:ec2_cert}": source => "/opt/keys/controller_keys/${zpf-controller:ec2_cert}", </pre> Errors with the following: <pre> May 10 16:19:51 zpf-controller-dev-1-10g-ruk puppet-master[20240]: Syntax error at ':'; expected '}' at /etc/puppet/modules/zpf/manifests/init.pp:264 on node zpf-controller-dev-2-512m-c4l </pre> So the variables are not being interpolated in the curly brackets. However this does work. <pre> file { "/root/.ssh/$zpf-controller:ec2_cert": source => "/opt/keys/controller_keys/$zpf-controller:ec2_cert", </pre> Does this mean that you cannot "curly bracket" namespace variables? Is this a bug or another **significant** change in the variable interpolation changes that come with 2.7.x? -- 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.
