aboutsummaryrefslogtreecommitdiff
path: root/templates/host.conf.erb
blob: c3514d34d41b1f0124ea9528d2dbbc6f37489145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<%- @hash_data.sort.each do |host, datas| -%>
<%- datas.fetch('interfaces').sort.each do |if_name, if_mac| -%>
host <%= host %>-<%= if_name %> {
  hardware ethernet <%= if_mac %>;
<% if datas.fetch('fixed_address', false) -%>
  fixed-address <%= datas.fetch('fixed_address') %>
<% else -%>
  fixed-address <%= host %>
<% end -%>
<% if datas.fetch('option', false) -%>
  <%= datas.fetch('option') %>
<% end -%>
}
<% end -%>
<% end -%>