New pxe server role structure

This commit is contained in:
Khue Doan 2021-02-07 14:15:27 +07:00
parent fe6b190919
commit 9a7e2a2c3a
7 changed files with 19 additions and 11 deletions

View File

@ -0,0 +1,8 @@
subnet: "192.168.1.0"
netmask: "255.255.255.0"
gateway: "192.168.1.1"
range_start: "192.168.1.11"
range_end: "192.168.1.99"
pxe_server: "192.168.1.21"
dns: "8.8.8.8"
network_device: "eno1"

View File

@ -1,2 +0,0 @@
network --bootproto=static --device=$NETWORK_DEVICE --ip=$IP --gateway=$GATEWAY --nameserver=$DNS1 --nameserver=$DNS2 --netmask=$NETMASK --ipv6=auto --activate
network --hostname=$HOSTNAME

View File

@ -1,5 +0,0 @@
set timeout=5
menuentry 'CentOS' {
linuxefi vmlinuz ip=dhcp inst.repo=http://192.168.1.21/CentOS ks=http://192.168.1.21/kickstart/centos8.ks
initrdefi initrd.img
}

View File

@ -5,13 +5,13 @@ option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
option architecture-type code 93 = unsigned integer 16;
subnet $SUBNET netmask $NETMASK {
option routers $ROUTERS;
range $RANGE_START $RANGE_END;
subnet {{ subnet }} netmask {{ netmask }} {
option routers {{ routers }};
range {{ range_start }} {{ range_end }};
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server $NEXT_SERVER;
next-server {{ pxe_server }};
if option architecture-type = 00:07 {
filename "grubx64.efi";

View File

@ -0,0 +1,2 @@
network --bootproto=static --device={{ network_device }} --ip={{ node_ip }} --gateway={{ gateway }} --nameserver={{ dns }} --netmask={{ netmask }} --ipv6=auto --activate
network --hostname={{ node_hostname }}

View File

@ -0,0 +1,5 @@
set timeout=5
menuentry 'CentOS' {
linuxefi vmlinuz ip=dhcp inst.repo=http://{{ pxe_server }}/CentOS ks=http://{{ pxe_server }}/kickstart/centos8.ks
initrdefi initrd.img
}