Issue #6269 has been updated by James Turnbull. Target version changed from 2.6.6 to 2.6.x
---------------------------------------- Bug #6269: Hashes only work with two levels https://projects.puppetlabs.com/issues/6269 Author: Chip Schweiss Status: Available In Testing Branch Priority: Normal Assignee: Daniel Pittman Category: parser Target version: 2.6.x Affected Puppet version: 2.6.4 Keywords: Branch: https://github.com/masterzen/puppet/tree/tickets/2.6.x/6269 Create a hash: $networkinfo = { 'machine1.domain.local' => { eth0 => { ip => '192.168.1.50', mask => '255.255.255.0', gw => '192.168.1.254' }, eth1 => { ip => '192.168.2.68', mask => '255.255.255.0' } }, 'machine2.domain.local' => { eth0 => { ip => '192.168.1.51', mask => '255.255.255.0', gw => '192.168.1.254' }, eth1 => { ip => '192.168.2.74', mask => '255.255.255.0' } } } Attempt to extract an IP: $ipaddress = $networkinfo["$fqdn"]["$iface"]['ip'] This will fail with a syntax error. To get the IP address a layer must be peeled off: $network = $networkinfo["$fqdn"] $ipaddress = $network["$iface"]['ip'] Either correct the hash parsing or updated the documentation properly explaining the use of hashes and Puppet's limitations. -- 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.
