aboutsummaryrefslogtreecommitdiff
path: root/templates/host.conf.erb
blob: e6a7073f6146bab8d8c0e1c88c28e6444e10b1e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<%- @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') %>
<% elsif @global_options -%>
  <%= @global_options %>
<% end -%>
}
<% end -%>
<% end -%>