Issue #5516 has been updated by James Turnbull. Target version changed from 2.6.6 to 2.6.x
---------------------------------------- Bug #5516: Hashes can't be used in selectors https://projects.puppetlabs.com/issues/5516 Author: Peter Meier Status: Available In Testing Branch Priority: Normal Assignee: Brice Figureau Category: language Target version: 2.6.x Affected Puppet version: 2.6.4 Keywords: Branch: https://github.com/masterzen/puppet/tree/tickets/2.6.x/5516 The following statement fails with a parse error: <pre> $int = { 'eth0' => 'bla' $foo = $int['eth0'] ? { 'bla' => 'foo', default => 'bleh' } notice $foo </pre> Error: <pre> /usr/lib/ruby/1.8/puppet/parser/parser_support.rb:172:in `on_error' /usr/lib/ruby/1.8/puppet/util/autoload.rb:79:in `_racc_yyparse_c' /usr/lib/ruby/1.8/puppet/parser/lexer.rb:483:in `scan' /usr/lib/ruby/1.8/racc/parser.rb:152:in `_racc_yyparse_c' /usr/lib/ruby/1.8/racc/parser.rb:152:in `__send__' /usr/lib/ruby/1.8/racc/parser.rb:152:in `yyparse' /usr/lib/ruby/1.8/puppet/parser/parser_support.rb:181:in `parse' /usr/lib/ruby/1.8/puppet/resource/type_collection.rb:165:in `perform_initial_import' /usr/lib/ruby/1.8/puppet/node/environment.rb:84:in `known_resource_types' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/1.8/puppet/node/environment.rb:81:in `known_resource_types' /usr/lib/ruby/1.8/puppet/resource/type_collection_helper.rb:5:in `known_resource_types' /usr/lib/ruby/1.8/puppet/parser/compiler.rb:423:in `initvars' /usr/lib/ruby/1.8/puppet/parser/compiler.rb:181:in `initialize' /usr/lib/ruby/1.8/puppet/parser/compiler.rb:18:in `new' /usr/lib/ruby/1.8/puppet/parser/compiler.rb:18:in `compile' /usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in `compile' /usr/lib/ruby/1.8/puppet/util.rb:180:in `benchmark' /usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in `compile' /usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in `find' /usr/lib/ruby/1.8/puppet/indirector/indirection.rb:193:in `find' /usr/lib/ruby/1.8/puppet/indirector.rb:50:in `find' /usr/lib/ruby/1.8/puppet/application/apply.rb:115:in `main' /usr/lib/ruby/1.8/puppet/application/apply.rb:35:in `run_command' /usr/lib/ruby/1.8/puppet/application.rb:300:in `run' /usr/lib/ruby/1.8/puppet/application.rb:397:in `exit_on_fail' /usr/lib/ruby/1.8/puppet/application.rb:300:in `run' /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute' /usr/bin/puppet:4 /usr/lib/ruby/1.8/puppet/parser/compiler.rb:21:in `compile' /usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in `compile' /usr/lib/ruby/1.8/puppet/util.rb:180:in `benchmark' /usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in `compile' /usr/lib/ruby/1.8/puppet/indirector/catalog/compiler.rb:34:in `find' /usr/lib/ruby/1.8/puppet/indirector/indirection.rb:193:in `find' /usr/lib/ruby/1.8/puppet/indirector.rb:50:in `find' /usr/lib/ruby/1.8/puppet/application/apply.rb:115:in `main' /usr/lib/ruby/1.8/puppet/application/apply.rb:35:in `run_command' /usr/lib/ruby/1.8/puppet/application.rb:300:in `run' /usr/lib/ruby/1.8/puppet/application.rb:397:in `exit_on_fail' /usr/lib/ruby/1.8/puppet/application.rb:300:in `run' /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute' /usr/bin/puppet:4 Could not parse for environment production: Syntax error at 'foo'; expected '}' at /tmp/foo.pp:2 on node foobar </pre> -- 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.
