Revert "Explcitly disable IPv6 on the IC internal network"
authorTom Hughes <tom@compton.nu>
Mon, 21 Mar 2016 13:08:47 +0000 (13:08 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 21 Mar 2016 13:08:47 +0000 (13:08 +0000)
This reverts commit aa02df0d2f61fb4d1839e1e9fca1ec95c249572a.

cookbooks/networking/recipes/default.rb
cookbooks/networking/templates/default/interfaces.erb
roles/ic.rb

index 67d7bcf3e0ad667324e22fa87bffcd15c4a11c31..39611a9dfdb0e2aa5bde681cb40bbd2aa8921a9d 100644 (file)
@@ -25,7 +25,6 @@ require "ipaddr"
 node[:networking][:interfaces].each do |name, interface|
   if interface[:role] && (role = node[:networking][:roles][interface[:role]])
     if role[interface[:family]]
-      node.set[:networking][:interfaces][name][:method] = role[interface[:family]][:method]
       node.set[:networking][:interfaces][name][:prefix] = role[interface[:family]][:prefix]
       node.set[:networking][:interfaces][name][:gateway] = role[interface[:family]][:gateway]
     end
@@ -34,14 +33,12 @@ node[:networking][:interfaces].each do |name, interface|
     node.set[:networking][:interfaces][name][:zone] = role[:zone]
   end
 
-  node.set_unless[:networking][:interfaces][name][:method] = "static"
-
-  next unless interface[:address]
-
   prefix = node[:networking][:interfaces][name][:prefix]
 
+  # rubocop:disable Style/RedundantParentheses
   node.set[:networking][:interfaces][name][:netmask] = (~IPAddr.new(interface[:address]).mask(0)).mask(prefix)
   node.set[:networking][:interfaces][name][:network] = IPAddr.new(interface[:address]).mask(prefix)
+  # rubocop:enable Style/RedundantParentheses
 end
 
 template "/etc/network/interfaces" do
index 33cc6620f529949f60fbad54a63fa6866bc804bc..89fc316eb4aa1810321eda4af1787a498c9c8bdb 100644 (file)
@@ -3,10 +3,8 @@
 iface lo inet loopback
 <% node[:networking][:interfaces].each do |name,interface| -%>
 
-iface <%= interface[:interface] %> <%= interface[:family] %> <%= interface[:method] %>
-<% if interface[:address] -%>
+iface <%= interface[:interface] %> <%= interface[:family] %> static
       address   <%= interface[:address] %>
-<% end -%>
 <% if interface[:family] == "inet" -%>
       netmask   <%= interface[:netmask] %>
 <% elsif interface[:family] == "inet6" -%>
index ea4d17b7a6814d58f34ba64de44cc7c78a389e68..af78c9f2395e0230136d9880153d9c39268c0a50 100644 (file)
@@ -14,9 +14,6 @@ default_attributes(
         :inet => {
           :prefix => "27",
           :gateway => "146.179.159.177"
-        },
-        :inet6 => {
-          :method => "manual"
         }
       },
       :external => {