Issue #14197 has been reported by Cristian Măgherușan-Stanciu.
----------------------------------------
Bug #14197: variable assignment is not behaving declaratively in case of
definitions
https://projects.puppetlabs.com/issues/14197
Author: Cristian Măgherușan-Stanciu
Status: Unreviewed
Priority: Normal
Assignee:
Category: compiler
Target version:
Affected Puppet version: 2.6.7
Keywords:
Branch:
See the following example:
define bla() {
exec { "${name}": command => "/usr/bin/touch ${name}", }
}
#the code works if you enable the next line
#$letters = ['A','B']
$files = $letters
bla { $files: }
#compilation fails if this line is enabled
#$letters = ['A','B']
Expected behavior:
The code should work the same in both cases.
We have an ENC and it can also be reproduced, since it behaves as if the
variables were assigned at the end of the Puppet code.
This was observed initially on version 2.6.7 but 2.7.1 is also broken.
--
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.