Ales Komarek | 5fff552 | 2014-09-21 17:52:22 +0200 | [diff] [blame^] | 1 | {%- from "isc_dhcp/map.jinja" import server with context %} |
| 2 | |
Ales Komarek | e653a10 | 2014-09-21 17:36:15 +0200 | [diff] [blame] | 3 | {%- for subnet_name, subnet in server.subnet.iteritems() %} |
| 4 | |
| 5 | subnet {{ subnet.network }} netmask {{ subnet.netmask }} { |
| 6 | {%- if subnet.range is defined %} |
| 7 | pool |
| 8 | { |
Ales Komarek | 9b60293 | 2014-09-21 17:45:06 +0200 | [diff] [blame] | 9 | #failover peer "dhcp-failover"; |
Ales Komarek | e653a10 | 2014-09-21 17:36:15 +0200 | [diff] [blame] | 10 | range {{ subnet.range }}; |
| 11 | } |
| 12 | {%- endif %} |
| 13 | |
| 14 | option subnet-mask {{ subnet.netmask }}; |
| 15 | {%- if subnet.gateway is defined %} |
| 16 | option routers {{ subnet.gateway }}; |
| 17 | {%- endif %} |
| 18 | {%- if subnet.pxeserver is defined %} |
| 19 | next-server {{ subnet.pxeserver }}; |
| 20 | {%- endif %} |
| 21 | } |
| 22 | |
| 23 | {%- endfor %} |