Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.5.6
-
Fix Version/s: 0.7.0
-
Component/s: None
-
Labels:None
-
Environment:
Intended to be platform agnostic, but will be developed for CentOS
Description
Need an interface provider to manage IP address assignment, netmask, broadcast, aliases, bonded interfaces. Will be modeling the RHEL interface spec. I am writing this to manage the sysconfig files, but will leave hooks where net config files for other distros can be tied in.
Interface provider for setting up ifconfig. Currently writes the sysconfig files for CentOS, and has a template case stubbed out in the provider for other distro's. In the cookbook, you would use this provider like so:
ifconfig "10.33.69.70" do
1"
device "eth0"
bcast "10.33.69.79"
mask "255.255.255.240"
mtu "1500"
metric "1"
hwaddr "3A:6F:36:0F:36
onboot "yes"
bootproto "none"
network "10.33.69.64"
end
ifconfig "10.33.69.72" do
device "eth0:1"
bcast "10.33.69.79"
mask "255.255.255.240"
mtu "1500"
metric "1"
onboot "yes"
bootproto "none"
network "10.33.69.64"
end
I would like to integrate this a little tighter with the route provider, to dry up things like the device and network type, but as a first pass it gets the job done. Interested in hearing any feedback regarding a better way that this may be modeled, or if there is a better way to handle the templates rather than just calling ERB from within the provider code itself. Will be extending this to support bonded interfaces and vlan flavor, but its worthy of an initial push.
root@sfdchef02 ~/opscode/chef/chef
CHEF-220Counting objects: 702, done.
Compressing objects: 100% (212/212), done.
Writing objects: 100% (595/595), 70.60 KiB, done.
Total 595 (delta 392), reused 564 (delta 365)
To git@github.com:jasonjackson/chef.git
CHEF-220->CHEF-220root@sfdchef02 ~/opscode/chef/chef
#