Hi Maciek, So there are a lot of possible ways to do this, but I suppose the first thing I’d need to know is whether these interfaces need to be set up with static addresses or dynamic ones, and whether all 4 interfaces in the example would need to have different setups. The simplest thing to do would be to just define a both interfaces using DHCP in a single wrapper cookbook and then place that wrapper cookbook in the run list of both nodes. That might look something like this: include_recipe 'network_interfaces' %w(eth0 eth1).each do |alias| network_interface alias do bootproto 'dhcp' end end Obviously if you want to specify static IPs per node that’s going to require some finagling. The right way to do it will be determined by exactly how you want to allocate IPs. If you can give me some feedback on this I might be able to give you some suggestions. Almost any property that can be specified in the /etc/network/interfaces config file will be listed in the resource definition: https://github.com/redguide/network_interfaces/blob/v1.0.0/resources/default.rb …And one day will also be listed in the README. ;-) Also, anything that is not included in that resources file can be added by setting the “custom” property with a hash. E.g. network_interface 'eth0' do target '192.168.0.1' custom( 'myproperty1' => 'myvalue1', 'myproperty2' => 'myvalue2' ) end Please let me know if any of that isn’t clear or if I left out something you need. -- Eric On March 20, 2014 at 6:05:18 PM, Maciek Misztal ( "> ) wrote:
|
Archive powered by MHonArc 2.6.16.