2f503c228e
This change makes it possible to deploy ACNG within a physical host NOT automatically tied to an MNAIO installation. This also adds an infra preseed file which can be used to provision physical hosts. By default the domain name is now passed into the server boot params which is useful when setting up an environment in support of RFC-1034/5. Ubuntu 16.04 has an issue with the options "quiet splash" being passed in which cause it to have no usable console. See [Related-Issue] for more. Related-Issue: #1656605 Change-Id: I731dfb70e4b5d676d8c22082da77c0d22d5afb58 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
51 lines
1.8 KiB
Django/Jinja
51 lines
1.8 KiB
Django/Jinja
ddns-update-style none;
|
|
|
|
allow booting;
|
|
allow bootp;
|
|
|
|
log-facility local7;
|
|
authoritative;
|
|
|
|
shared-network all-networks {
|
|
{% for dhcp in dhcp_list %}
|
|
subnet {{ dhcp.subnet }} netmask {{ dhcp.netmask }} {
|
|
option routers {{ dhcp.gateway }};
|
|
option domain-name-servers {{ dhcp.dns }};
|
|
option subnet-mask {{ dhcp.netmask }};
|
|
{% if dhcp.default_lease_time is defined and dhcp.default_lease_time > 0 %}
|
|
default-lease-time {{ dhcp.default_lease_time }};
|
|
{% else %}
|
|
default-lease-time {{ dhcp_default_lease_time }};
|
|
{% endif %}
|
|
{% if dhcp.max_lease_time is defined and dhcp.max_lease_time > 0 %}
|
|
max-lease-time {{ dhcp.max_lease_time }};
|
|
{% else %}
|
|
max-lease-time {{ dhcp_max_lease_time }};
|
|
{% endif %}
|
|
{% if dhcp.tftp_server is defined and dhcp.tftp_server|ipaddr %}
|
|
next-server {{ dhcp.tftp_server }};
|
|
{% elif tftp_server is defined and tftp_server|length > 0 %}
|
|
next-server {{ tftp_server }};
|
|
{% endif %}
|
|
{% if dhcp.tftp_boot_path is defined and dhcp.tftp_boot_path|ipaddr %}
|
|
filename "{{ dhcp.tftp_boot_path }}";
|
|
{% elif tftp_boot_path is defined and tftp_boot_path|length > 0 %}
|
|
filename "{{ tftp_boot_path }}";
|
|
{% endif %}
|
|
}
|
|
|
|
{% endfor %}
|
|
|
|
group {
|
|
{% for item in groups['pxe_servers'] %}
|
|
host {{ hostvars[item]['server_hostname'] }} {
|
|
hardware ethernet {{ hostvars[item]['server_mac_address'] | lower }};
|
|
fixed-address {{ hostvars[item]['server_vm_fixed_addr'] }};
|
|
option host-name "{{ hostvars[item]['server_hostname'] }}";
|
|
}
|
|
{% endfor %}
|
|
|
|
}
|
|
|
|
}
|