blob: ad043e9abc23e6de2fa28786b73be74b84d494ef [file] [log] [blame]
Zack Williams81470de2016-04-11 12:44:38 -07001<network>
2 <name>xos-{{ item.name }}</name>
3 <bridge name="{{ item.name }}"/>
4 <forward/>
5 <domain name="{{ site_suffix }}" localonly="no"/>
6 <dns>
7{% if unbound_listen_on_default %}
8{% for host in groups['head'] %}
9 <forwarder addr="{{ hostvars[host].ansible_default_ipv4.address }}"/>
10{% endfor %}
11{% endif %}
12{% if dns_servers is defined %}
13{% for ns in dns_servers %}
14 <forwarder addr="{{ ns }}"/>
15{% endfor %}
16{% endif %}
17 </dns>
18 <ip address="{{ item.ipv4_prefix }}.1" netmask="255.255.255.0">
19 <dhcp>
20 <range start="{{ item.ipv4_prefix }}.2" end="{{ item.ipv4_prefix }}.254"/>
21{% if item.head_vms %}
22{% for vm in head_vm_list %}
23 <host name='{{ vm.name }}' ip='{{ item.ipv4_prefix }}.{{ vm.ipv4_last_octet }}'/>
24{% endfor %}
25{% endif %}
26 </dhcp>
27 </ip>
28</network>