there is other options you can use, you'd better look at lwrp ressource file to understand how it can work, and what can be changed :Ohai !Actually I'm using this very simple resource to manage my server's eth0 :
I'm working regularly with this cookbook's author. Don't hesitate to create a github issue asking for some doc if you feel the need to.
network_interfaces 'eth0' do
target '10.10.16.203'
mask '255.255.128.0'
gateway '10.10.1.253'
end
attribute :device, kind_of: String, name_attribute: trueattribute :bridge, kind_of: [TrueClass, FalseClass, Array]attribute :bridge_stp, kind_of: [TrueClass, FalseClass]attribute :bond, kind_of: [TrueClass, FalseClass, Array]attribute :bond_mode, kind_of: Stringattribute :vlan_dev, kind_of: Stringattribute :onboot, kind_of: [TrueClass, FalseClass], default: trueattribute :bootproto, kind_of: Stringattribute :target, kind_of: Stringattribute :gateway, kind_of: Stringattribute :metric, kind_of: Integerattribute :mtu, kind_of: Integerattribute :mask, kind_of: Stringattribute :network, kind_of: Stringattribute :broadcast, kind_of: Stringattribute :pre_up, kind_of: Stringattribute :up, kind_of: Stringattribute :post_up, kind_of: Stringattribute :pre_down, kind_of: Stringattribute :down, kind_of: Stringattribute :post_down, kind_of: Stringattribute :custom, kind_of: Hash--On Wed, Mar 19, 2014 at 7:04 PM, Maciek Misztal < " target="_blank"> > wrote:
Are there some usage examples? This cookbook's documentation is severely lacking - I'm not proficient with Chef yet, so I'm having a hard time understanding how to use it.cheers,
MaciejOn Wed, Mar 19, 2014 at 5:25 PM, Eric Herot < " target="_blank"> > wrote:
Not sure if this is useful for your particular case but if what you’re trying to do is set up some existing physical NICs (or virtual NICs if you’re in a cloud computing environment) there is a cookbook for that:--
EricOn March 19, 2014 at 12:09:24 PM, Kenneth Barry ( " target="_blank"> ) wrote:
Other will certainly improve on this.Youll probably wanna add a bit of logic just after that first line to help ignore it is the nic is the lo nic.I'm going to take an initial whack at this, and say I "think" its going to be something like[whatever you want to do here]
node[network][interfaces].each do |nic|
On Wed, Mar 19, 2014 at 8:10 AM, Maciek Misztal < " target="_blank"> > wrote:
I'm looking for a way to configure N (N=3) ubuntu nodes with 2 network interfaces each - since I'm a complete newb, what is the proper way to do it?Regards,
Maciej
Archive powered by MHonArc 2.6.16.