Project

General

Profile

« Previous | Next » 

Revision e9f23c1b

Added by Andrei Brezan about 8 years ago

Expose dhcp_subnets parameter

Add new variable in params dhcp_subnets
Set dhcp_subnets accordingly via template dhcp.yml.erb
Fixes GH-109

View differences:

templates/dhcp.yml.erb
:use_provider: dhcp_<%= scope.lookupvar("foreman_proxy::dhcp_provider") %>
:server: <%= scope.lookupvar("foreman_proxy::dhcp_server") %>
# subnets restricts the subnets queried to a subset, to reduce the query time.
#:subnets: [192.168.205.0/255.255.255.128, 192.168.205.128/255.255.255.128]
<% if subnets = scope.lookupvar("foreman_proxy::dhcp_subnets") and subnets.any? -%>
:subnets:
<% subnets.each do |c| -%>
<%= " - #{c}" %>
<% end -%>
<% else -%>
#:subnets:
# - 192.168.205.0/255.255.255.128
# - 192.168.205.128/255.255.255.128
<% end -%>

Also available in: Unified diff