diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-06-16 10:30:33 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-06-16 10:30:33 -0400 |
commit | f949e043f776421eb4ece82647ab62b788c8a490 (patch) | |
tree | e778c373c8ed63ce3245363e594b27ddd127c582 /templates/dhcp.template | |
parent | dda52260f01e3bcea42050bbf78133d5809966ce (diff) | |
download | cobbler-f949e043f776421eb4ece82647ab62b788c8a490.tar.gz cobbler-f949e043f776421eb4ece82647ab62b788c8a490.tar.xz cobbler-f949e043f776421eb4ece82647ab62b788c8a490.zip |
Apply Al Tobey's patch to further templatize the ISC DHCP config file.
Diffstat (limited to 'templates/dhcp.template')
-rw-r--r-- | templates/dhcp.template | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/templates/dhcp.template b/templates/dhcp.template index 344b108f..0204d1f5 100644 --- a/templates/dhcp.template +++ b/templates/dhcp.template @@ -26,5 +26,35 @@ subnet 192.168.1.0 netmask 255.255.255.0 { next-server $next_server; } -$insert_cobbler_system_definitions +#for dhcp_tag in $dhcp_tags.keys(): + ## group could be subnet if your dhcp tags line up with your subnets + ## or really any valid dhcpd.conf construct ... if you only use the + ## default dhcp tag in cobbler, the group block can be deleted for a + ## flat configuration +# group for Cobbler DHCP tag: $dhcp_tag +group { + #for mac in $dhcp_tags[$dhcp_tag].keys(): + #set iface = $dhcp_tags[$dhcp_tag][$mac] + host $iface.name { + hardware ethernet $mac; + #if $iface.ip_address: + fixed-address $iface.ip_address; + #end if + #if $iface.subnet: + option subnet-mask $iface.subnet; + #end if + #if $iface.gateway: + option routers $iface.gateway; + #end if + #if $iface.system.netboot_enabled: + filename "$iface.filename"; + ## Cobbler defaults to $next_server, but some users + ## like to use $iface.system.server for proxied setups + next-server $next_server; + ## next-server $iface.system.server; + #end if + } + #end for +} +#end for |