diff options
author | Aaron Kalin <akalin@martinisoftware.com> | 2018-02-20 17:07:07 -0600 |
---|---|---|
committer | Aaron Kalin <akalin@martinisoftware.com> | 2018-02-20 17:08:50 -0600 |
commit | cd91f426c9333671ed06d5ef29410602be12414d (patch) | |
tree | 624846e3b07679693302bfcac09e993d3f3df5e7 /lib | |
parent | 1b84b4ddf607dfad71edcd4ee602bbb8f36696ec (diff) | |
download | chef-cd91f426c9333671ed06d5ef29410602be12414d.tar.gz |
Add support for network family in Debian
Signed-off-by: Aaron Kalin <akalin@martinisoftware.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/ifconfig/debian.rb | 6 | ||||
-rw-r--r-- | lib/chef/resource/ifconfig.rb | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/provider/ifconfig/debian.rb b/lib/chef/provider/ifconfig/debian.rb index 369c222b7a..e1e978fdde 100644 --- a/lib/chef/provider/ifconfig/debian.rb +++ b/lib/chef/provider/ifconfig/debian.rb @@ -36,11 +36,11 @@ class Chef <% if new_resource.onboot == "yes" %>auto <%= new_resource.device %><% end %> <% case new_resource.bootproto when "dhcp" %> -iface <%= new_resource.device %> inet dhcp +iface <%= new_resource.device %> <%= new_resource.family %> dhcp <% when "bootp" %> -iface <%= new_resource.device %> inet bootp +iface <%= new_resource.device %> <%= new_resource.family %> bootp <% else %> -iface <%= new_resource.device %> inet static +iface <%= new_resource.device %> <%= new_resource.family %> static <% if new_resource.target %>address <%= new_resource.target %><% end %> <% if new_resource.mask %>netmask <%= new_resource.mask %><% end %> <% if new_resource.network %>network <%= new_resource.network %><% end %> diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb index e9ef47d95b..d80abd090d 100644 --- a/lib/chef/resource/ifconfig.rb +++ b/lib/chef/resource/ifconfig.rb @@ -38,6 +38,7 @@ class Chef property :target, String, name_property: true property :hwaddr, String property :mask, String + property :family, String, default: 'inet' property :inet_addr, String property :bcast, String property :mtu, String |