I'm trying to use a hash for the first time in puppet, so in my nodes.pp I'm going to use this:
node test1.example.com { netset::int::vconf {"servers" : label1 => { 'comment' => 'VIP Test1', 'ipaddress' => '192.168.1.10', 'netmask' => '255.255.255.0', 'int_label' => 'TEST1' }, label2 => { 'comment' => 'VIP Test2', 'ipaddress' => '192.168.1.11', 'netmask' => '255.255.255.0', 'int_label' => 'TEST2' }, } } In the file /etc/puppet/modules/netset/int/vconf.pp that I am writing I'm creating a defined type:
define netset::int::vconf ($comment,$ipaddress){...do somethings...}
My questionis how do I pass each keys of the hashes to the defined type? Somehow I'm imagining I'm going to have to create a loop somewhere, any help would be of great assistance.
Thanks Dan