On Thu, Feb 10, 2011 at 09:32, Matthew Pounsett <[email protected]> wrote:
This works for me on 2.6.5rc2, which is before any of the recent
patching of the parser in the area:
$dev_numbers = {
'null' => {
'freebsd' => [ 0, 6 ],
'ubuntu' => [ 1, 3 ],
},
'random' => {
'freebsd' => [ 0, 12 ],
'ubuntu' => [ 1, 8 ],
},
'zero' => {
'freebsd' => [ 0, 7 ],
'ubuntu' => [ 1, 5 ],
},
}
notice(inline_template("<%= dev_numbers.inspect %>"))
⚡ puppet apply ~/tmp/test.pp
notice: Scope(Class[main]): {"random"=>{"freebsd"=>["0", "12"],
"ubuntu"=>["1", "8"]}, "null"=>{"ubuntu"=>["1", "3"], "freebsd"=>["0",
"6"]}, "zero"=>{"freebsd"=>["0", "7"], "ubuntu"=>["1", "5"]}}
notice: Finished catalog run in 0.01 seconds
I think the mental trick is that you need to use '=>' to separate the
key and value in a hash; it depends on the surrounding context, not
the type on the right hand side of the entry in the hash.
Regards,
Daniel
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <[email protected]>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.