It looks like a bug to me, but there's a pretty easy workaround: pull out the selector body as a hash of hashes, and select the desired value via ordinary hash indexing. The only trick is handling the 'default' case, but that's doable:
$panel_options = { cpanel => {'admin_interface' => '2087', 'user_interface' => '2077,2078,2082,2083,2086,2095,2096'}, directadmin => {'admin_interface' => '2222', 'user_interface' => '2222'}, plesk => {'admin_interface' => '8443', 'user_interface' => '8443'} } if has_key($panel_options, $control_panel) { $panel_tcp_in = $panel_options[$control_panel] } else { $panel_tcp_in = {'admin_interface' => '', 'user_interface' => ''} } Note that the 'has_key' function is not built-in; instead, it comes from Puppetlabs' "stdlib" add-in module. You can achieve the same thing without, but it's longer and uglier. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.