Merge "Fix dhcp range for static inventory"
This commit is contained in:
commit
61850681ab
@ -67,8 +67,15 @@ dhcp_lease_time: 12h
|
||||
Alternatively, a user can choose to perform static DHCP assignments to nodes.
|
||||
This can be enabled by setting the ``inventory_dhcp`` setting to ``true``.
|
||||
This will result in the ``dhcp_pool_start`` and ``dhcp_pool_end`` settings
|
||||
being ignored and the ``ipv4_address`` setting being bound to the first
|
||||
listed MAC address for the node.
|
||||
only being used to define the range of valid ips to be accepted, and the
|
||||
``ipv4_address`` setting being bound to the first listed MAC address for
|
||||
the node.
|
||||
If you choose to use the static DHCP assignments, you may need to set
|
||||
the ``dhcp_static_mask`` setting according to your needs. It defaults to
|
||||
a /24 range.
|
||||
In the case of static inventory, please also consider to set the
|
||||
``dhcp_lease_time`` setting to infinite, to avoid unnecessary refreshes
|
||||
of ips.
|
||||
|
||||
In case your HW needs a kernel option to boot, set the following variable:
|
||||
|
||||
|
@ -56,6 +56,7 @@ enabled_drivers: "agent_ipmitool,pxe_amt,agent_ilo,agent_ucs"
|
||||
dhcp_pool_start: 192.168.1.200
|
||||
dhcp_pool_end: 192.168.1.250
|
||||
dhcp_lease_time: 12h
|
||||
dhcp_static_mask: 255.255.255.0
|
||||
# Dnsmasq default route for clients. If not defined, dnsmasq will push to clients
|
||||
# as default route the same IP of the dnsmasq server.
|
||||
# Default: undefined
|
||||
|
@ -156,6 +156,8 @@ dhcp-hostsfile=/etc/dnsmasq.d/bifrost.dhcp-hosts.d
|
||||
# service.
|
||||
{% if testing %}
|
||||
dhcp-range=192.168.122.2,192.168.122.254,12h
|
||||
{% elif inventory_dhcp %}
|
||||
dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},static,{{dhcp_static_mask}},{{dhcp_lease_time}}
|
||||
{% else %}
|
||||
dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},{{dhcp_lease_time}}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user