mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-25 22:18:53 +07:00
New pxe server role structure
This commit is contained in:
parent
fe6b190919
commit
9a7e2a2c3a
8
metal/roles/pxe-server/defaults/main.yml
Normal file
8
metal/roles/pxe-server/defaults/main.yml
Normal 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"
|
@ -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
|
@ -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
|
||||
}
|
@ -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";
|
@ -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 }}
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user