#version=DEVEL # # Kickstart installation file with minimal package set # # Author: Thomas Bendler # Date: Sun Jun 14 14:16:17 CEST 2020 # Revision: 1.0 # # Distribution: CentOS Server # Version: 8 # Processor: x86_64 # System partition information ignoredisk --only-use=sda autopart --type=lvm clearpart --all --initlabel --drives=sda # Use graphical install from CDROM installation media graphical cdrom # System bootloader configuration bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda # System language settings #keyboard --vckeymap=de-nodeadkeys --xlayouts='de (nodeadkeys)' keyboard --vckeymap=de-mac_nodeadkeys --xlayouts='de (mac_nodeadkeys)' lang de_DE.UTF-8 --addsupport=en_US.UTF-8 # Network information network --bootproto=static --device=enp0s3 --ipv6=auto --activate --ip=10.0.2.102 --netmask=255.255.255.0 --gateway=10.0.2.1 --nameserver=8.8.8.8 --hostname=k8s-worker-node-2 # System timezone timezone Europe/Berlin --isUtc # System password for root (0nly4!nstall) rootpw --iscrypted $6$wsriqWDRzVhUx611$8Vuq4EMf.R9zznRuRIlk.zmOctAtbHV/V6QrmAzTqapcHeYZObgOYyb4wR9szBM1CCqIFacLe7uBo3yAw3LTW1 # Configure Firewall firewall --enabled --ssh # System services services --enabled="chronyd" # Ansible user (0nly4!nstall) user --groups=wheel --name=ansible --password=$6$qG656ivFMysgQKMC$0pckxsgdrwOvKAlTaUXqv7V0XJhDZhFDcUixQkMHjkwbXgogAZPv1Ow7KXPVEcbU7W7ksLJqEfI4vt6sv78Nb. --iscrypted --gecos="Ansible Configuration User" # General kickstart settings firstboot --enable skipx reboot --eject # System packages %packages @^server-product-environment @guest-agents %end # System addons %addon com_redhat_kdump --disable --reserve-mb='128' %end # Post installation settings %post --log=/root/kickstart-post.log /usr/bin/logger "Setting up the passwordless external access for the Ansible configuration account" /usr/bin/mkdir /home/ansible/.ssh /usr/bin/chmod 700 /home/ansible/.ssh /usr/bin/echo "ssh-rsa AAA...BBB ansible@client" > /home/ansible/.ssh/authorized_keys /usr/bin/chmod 400 /home/ansible/.ssh/authorized_keys /usr/bin/chown -R ansible:ansible /home/ansible/.ssh /usr/bin/logger "Create the ssh key for the root account" /usr/bin/ssh-keygen -b 4096 -t rsa -f /root/.ssh/id_rsa -N '' /usr/bin/logger "Setting up the local name resolution" /usr/bin/echo "" >> /etc/hosts /usr/bin/echo "# Virtual lab k8s server names" >> /etc/hosts /usr/bin/echo "10.0.2.100 k8s-master k8s-master.vlab.local" >> /etc/hosts /usr/bin/echo "10.0.2.101 k8s-worker-node-1 k8s-worker-node-1.vlab.local" >> /etc/hosts /usr/bin/echo "10.0.2.102 k8s-worker-node-2 k8s-worker-node-2.vlab.local" >> /etc/hosts sync exit 0 %end %anaconda pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty %end