Commit 757ea1df authored by IMBERT Matthieu's avatar IMBERT Matthieu

[ipv6, dhcp] fix dhcpv6 conf

parent 107cd6d0
......@@ -38,7 +38,7 @@ def write_dhcp_files(data, options)
end
["dhcp", "dhcpv6"].each { |dhcpkind|
output = ERB.new(File.read(File.expand_path("templates/dhcp.erb", File.dirname(__FILE__)))).result(binding)
output = ERB.new(File.read(File.expand_path("templates/dhcp.erb", File.dirname(__FILE__))), nil, '-').result(binding)
output_file = Pathname("#{options[:output_dir]}/platforms/production/modules/generated/files/grid5000/#{dhcpkind}/#{data.fetch("site_uid")}/#{data.fetch('filename')}")
output_file.dirname.mkpath()
File.write(output_file, output)
......
......@@ -37,7 +37,11 @@ group {
<% dhcp_entries.each {|node| %>
host <%= node['uid_net'] %> {
hardware ethernet <%= node['mac'].upcase %>;
fixed-address <%= dhcpkind == 'dhcpv6' ? node['ipv6'] : node['ipv4'] %>;
<% if dhcpkind == 'dhcpv6' -%>
fixed-address6 <%= node['ipv6'] %>;
<% else -%>
fixed-address <%= node['ipv4'] %>;
<% end -%>
}
<% } %>
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment