Issue #14301 has been updated by Brice Figureau.

Currently the right hand part of the selector (selector values) only supports 
rvalues, and hashes are not rvalues.
We could promote those selector values to full-blown expressions (which covers 
much more than rvalues), FTW.
----------------------------------------
Bug #14301: Hashes can not be used in selectors (upgrading from 2.7.1->2.7.14)
https://projects.puppetlabs.com/issues/14301#change-66257

Author: Kristian Kostecky
Status: Accepted
Priority: Normal
Assignee: 
Category: server
Target version: 
Affected Puppet version: 2.7.14
Keywords: 
Branch: 


After upgrading from puppet 2.7.1 -> 2.7.14, I noticed that all the selectors 
that assigned hashes caused a parse error. I re-wrote them as if conditionals 
to bypass the issue, but I believe this is a bug.

Example:

  $test = $fqdn ? {
    'test'  => { 'test' => 'test', 't' => 't' },
    default => { 'test' => 'test', 't' => 't' },
  }

Gives:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could 
not parse for environment production: Syntax error at '{'; expected '}' at 
XXXXXX


-- 
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.

Reply via email to