RHEL/CentOS kickstart

inst.ks=/path/to/kickstart or https://example.com/kickstart.cfg

#platform=x86, AMD64 или Intel EM64T
#version=DEVEL

# RHEL
#eula --accept

# Install OS instead of upgrade
install

# Keyboard layouts
keyboard 'us'

# Root password 123456
rootpw --iscrypted $1$p08W29yt$i3xpn1vyoFfqAHvVdKmRJ0

# Create user
user --name="user" --groups="wheel" --password="user"

# System language
lang en_US

# Reboot after installation
reboot --eject

# System timezone
# timezone --utc [timezone]
timezone --utc --ntpservers=0.ru.pool.ntp.org,1.ru.pool.ntp.org,2.ru.pool.ntp.org,3.ru.pool.ntp.org [timezone]

# Use text mode install
text

# Firewall configuration
firewall --enabled --ssh

# Network information
# DHCP
network  --bootproto=dhcp --device=ens160 --noipv6 --onboot=yes

# Static
#network --bootproto=static --device=ens160 --noipv6 --onboot=yes --ip=192.168.XX.X --netmask=255.255.255.0 --gateway=192.168.XX.1 --nameserver=192.168.XX.1 --hostname="hostname.domain"

# Use network installation
url --url="https://mirror.yandex.ru/centos/$releasever/os/$basearch/"

# System authorization information
auth  --useshadow  --passalgo=sha512

# SELinux configuration
selinux --enforcing

# Do not configure the X Window System
skipx

# System bootloader configuration
bootloader --location=mbr

# Partition clearing information
clearpart --all --initlabel

# Disk partitioning information
part /boot --fstype="ext2" --size=512
part pv.01 --grow --size=1
volgroup vg_os pv.01
logvol / --vgname="vg_os" --fstype="ext4" --grow --size=8192 --name=root
logvol /var --vgname="vg_os" --fstype="ext4" --size=8192 --name=var
logvol /var/log --vgname="vg_os" --fstype="ext4" --size=512 --name=var_log
logvol /var/log/audit --vgname="vg_os" --fstype="ext4" --size=128 --name=var_log_audit
logvol /home --vgname="vg_os" --fstype="ext4" --size=1 --grow --name=home

# Packages
%packages
@core
@platform-vmware
deltarpm
ethtool
nano
mc
setroubleshoot-server
tmux
telnet
traceroute
yum-cron
yum-plugin-versionlock
yum-utils
unzip

# Don't install packages listed below
-aic94xx-firmware*
-alsa-*
-biosdevname
-btrfs-progs
-iprutils
-ivtv-firmware
-iwl*firmware
-NetworkManager-wifi
-tuned
%end

# Additional settings
%addon com_redhat_kdump --disable
%end

%post

# Make NetworkManager set connections up and then exit immediately
cat > /etc/NetworkManager/conf.d/c-and-q.conf.off <<EOF
[main]
configure-and-quit=true
EOF

%end