パペットで初めてハッシュを使用しようとしているので、nodes.pp でこれを使用します。
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' },
}
}
私が書いているファイル /etc/puppet/modules/netset/int/vconf.pp で、定義済みの型を作成しています。
define netset::int::vconf ($comment,$ipaddress){...do somethings...}
私の質問は、ハッシュの各キーを定義された型に渡すにはどうすればよいですか? どういうわけか、どこかにループを作成する必要があると想像しています。どんな助けも大いに役立ちます。
ありがとうダン