On Sun, Sep 16, 2012 at 2:23 PM, Jakov Sosic <jso...@srce.hr> wrote: > On 09/16/2012 04:47 PM, Stefan Schulte wrote: > >> or the interface property could accept a hash. I have not tried it >> myself but it should work because the puppetlabs f5 type seems to use >> it: >> >> https://github.com/puppetlabs/puppetlabs-f5#appendix > > > Also, if you don't mind to explain it, or to show by example what do you > mean by 'hash'? ty...
Assuming the following command: cobbler add system --name=blah \ --profile=someprofile \ --interface=eth0 \ --mac=SOMEMAC \ --interface-type=bond_slave \ --interface-master=bond0 \ --interface=eth1 \ --mac=SOMEMAC \ --interface-type=bond_slave \ --interface-master=bond0 \ ... The example above maps to the following puppet resource: cobbler_system { 'bla': profile => 'someprofile', interface => { 'eth0' => { 'mac' => somemac, 'interface-type' => bond_slave, ... }, 'eth1' => { 'mac' => ... }, ... } To support a hash for the interface attribute, make sure you override insync?, is_to_s, should_to_s and possibly change_to_s in the resource type. The f5_pool member attribute should provide an example. Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.