khuedoan-homelab/metal/roles/pxe_server/templates/kickstart.ks.j2
Khue Doan 4ec027a1bc perf(metal): install just OpenSSH server
Instead of the entire Headless Management group
2022-07-27 19:05:14 +07:00

56 lines
1.4 KiB
Django/Jinja

#version=RHEL8
# Do not use graphical install
text
# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8
# Partition clearing information
clearpart --all --drives={{ hostvars[item]['disk'] }}
# Partitioning
ignoredisk --only-use={{ hostvars[item]['disk'] }}
partition /boot/efi --fstype=vfat --size=512
partition / --fstype=ext4 --grow
# Network information
network --bootproto=static --device={{ hostvars[item]['network_interface'] }} --ip={{ hostvars[item]['ansible_host'] }} --gateway={{ ansible_default_ipv4.gateway }} --nameserver={{ dns_server }} --netmask={{ ansible_default_ipv4.netmask }} --ipv6=auto --hostname={{ hostvars[item]['inventory_hostname'] }} --activate
# Use network installation
repo --name="Repository" --baseurl=http://{{ ansible_default_ipv4.address }}/os
url --url="http://{{ ansible_default_ipv4.address }}/os"
# Disable Setup Agent on first boot
firstboot --disable
# Do not configure the X Window System
skipx
# Enable NTP
services --enabled="chronyd"
# System timezone
timezone {{ timezone }} --utc
# Create user (locked by default)
user --groups=wheel --name=admin
# Add SSH key
sshkey --username=root "{{ ssh_public_key }}"
# Disable root password login
rootpw --lock
# Disable SELinux
selinux --disabled
# Disable firewall
firewall --disabled
%packages
@^custom-environment
openssh-server
iscsi-initiator-utils
%end
# Enable iSCSI for Kubernetes storage
services --enable=iscsid
reboot