]> git.openstreetmap.org Git - chef.git/commitdiff
Make sure meraxes holds a DHCPv6 lease
authorTom Hughes <tom@compton.nu>
Fri, 24 Mar 2023 10:11:59 +0000 (10:11 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 24 Mar 2023 10:11:59 +0000 (10:11 +0000)
cookbooks/networking/templates/default/network.erb
roles/meraxes.rb

index 6e1493738961b34c78e875936facd79ad849b75c..431330e2c7a28700c6d1fd6a9d1331f8b6d7b54b 100644 (file)
@@ -2,6 +2,9 @@
 Name=<%= @interface[:interface] %>
 
 [Network]
+<% if @interface.dig(:inet6, :dhcp) -%>
+DHCP=ipv6
+<% end -%>
 <% if @interface[:inet] -%>
 Address=<%= @interface[:inet][:address] %>/<%== @interface[:inet][:prefix] %>
 <% end -%>
@@ -12,6 +15,17 @@ IPv6AcceptRA=no
 <% Array(@interface[:vlans]).sort.uniq.each do |vlan| -%>
 VLAN=<%= @interface[:interface] %>.<%= vlan %>
 <% end -%>
+<% if @interface.dig(:inet6, :dhcp) -%>
+
+[DHCPv6]
+<% if @interface[:inet6][:dhcp][:duidtype] -%>
+DUIDType=<%= @interface[:inet6][:dhcp][:duidtype] %>
+<% end -%>
+<% if @interface[:inet6][:dhcp][:duidrawdata] -%>
+DUIDRawData=<%= @interface[:inet6][:dhcp][:duidrawdata] %>
+<% end -%>
+WithoutRA=solicit
+<% end -%>
 <% if @interface.dig(:inet, :gateway) && @interface[:inet][:gateway] != @interface[:inet][:address] -%>
 
 [Route]
index 3fee32b314a923933fd9a63eaed76287ec11bd88..3c75dba623ad851ad8c458dbb47800b6dba253c2 100644 (file)
@@ -15,7 +15,11 @@ default_attributes(
         :inet6 => {
           :address => "2001:bc8:2d57:100:aa1e:84ff:fe72:e660",
           :prefix => "48",
-          :gateway => "2001:bc8:2::2:258:1"
+          :gateway => "2001:bc8:2::2:258:1",
+          :dhcp => {
+            :duidtype => "link-layer",
+            :duidrawdata => "00:01:14:e9:19:1c:49:e0"
+          }
         }
       }
     }