### Installs from the first attached CD-ROM/DVD on the system. cdrom ### Performs the kickstart installation in text mode. ### By default, kickstart installations are performed in graphical mode. text ### Accepts the End User License Agreement. eula --agreed ### Sets the language to use during installation and the default language to use on the installed system. lang ${vm_guest_os_language} ### Sets the default keyboard type for the system. keyboard ${vm_guest_os_keyboard} ### Configure network information for target system and activate network devices in the installer environment (optional) ### --onboot enable device at a boot time ### --device device to be activated and / or configured with the network command ### --bootproto method to obtain networking configuration for device (default dhcp) ### --noipv6 disable IPv6 on this device ### ### network --bootproto=static --ip=172.16.11.200 --netmask=255.255.255.0 --gateway=172.16.11.200 --nameserver=172.16.11.4 --hostname centos-linux-8 network --bootproto=dhcp ### The selected profile will restrict root login. ### Add a user that can login and escalate privileges. user --name=${build_username} --iscrypted --password=${build_password_encrypted} --groups=wheel ### Configure firewall settings for the system. ### --enabled reject incoming connections that are not in response to outbound requests ### --ssh allow sshd service through the firewall firewall --enabled --ssh ### Sets up the authentication options for the system. ### The SSDD profile sets sha512 to hash passwords. Passwords are shadowed by default ### See the manual page for authselect-profile for a complete list of possible options. authselect select sssd ### Sets the state of SELinux on the installed system. ### Defaults to enforcing. selinux --enforcing ### Sets the system time zone. timezone ${vm_guest_os_timezone} --utc ### Sets how the boot loader should be installed. bootloader --location=mbr ### Initialize any invalid partition tables found on disks. zerombr ### Removes partitions from the system, prior to creation of new partitions. ### By default, no partitions are removed. ### --linux erases all Linux partitions. ### --initlabel Initializes a disk (or disks) by creating a default disk label for all disks in their respective architecture. clearpart --all --initlabel ### Modify partition sizes for the virtual machine hardware. ### Create primary system partitions. part /boot --fstype xfs --size=1024 --label=BOOTFS part /boot/efi --fstype vfat --size=1024 --label=EFIFS part pv.01 --size=25 --grow ### Create a logical volume management (LVM) group. volgroup vg00 --pesize=4096 pv.01 ### Modify logical volume sizes for the virtual machine hardware. ### Create logical volumes. logvol swap --fstype swap --name=lv_swap --vgname=vg00 --size=2048 --label=SWAPFS logvol / --fstype xfs --name=lv_root --vgname=vg00 --size=8000 --label=ROOTFS logvol /home --fstype xfs --name=lv_home --vgname=vg00 --size=4000 --label=HOMEFS logvol /opt --fstype xfs --name=lv_opt --vgname=vg00 --size=1000 --label=OPTFS logvol /tmp --fstype xfs --name=lv_tmp --vgname=vg00 --size=1000 --label=TMPFS --fsoptions="nosuid,noexec,nodev" logvol /var --fstype xfs --name=lv_var --vgname=vg00 --size=2000 --label=VARFS --fsoptions="nosuid" logvol /var/tmp --fstype xfs --name=lv_vartmp --vgname=vg00 --size=1000 --label=LOGFS --fsoptions="nosuid,noexec,nodev" logvol /var/www --fstype xfs --name=lv_www --vgname=vg00 --size=2000 --label=LOGFS --fsoptions="nosuid,noexec,nodev" logvol /var/log --fstype xfs --name=lv_log --vgname=vg00 --size=1000 --label=LOGFS --fsoptions="nosuid,noexec,nodev" logvol /var/log/audit --fstype xfs --name=lv_audit --vgname=vg00 --size=1024 --label=AUDITFS --fsoptions="nosuid,noexec,nodev" ### Modifies the default set of services that will run under the default runlevel. services --enabled=NetworkManager,sshd,qemu-guest-agent ### Do not configure X on the installed system. skipx ### Disable firstboot. firstboot --disable ### Packages selection. %packages @^minimal-environment kexec-tools openssh-server openssh-clients sudo curl python3 python3-libselinux qemu-guest-agent -aic94xx-firmware -atmel-firmware -b43-openfwwf -bfa-firmware -ipw2100-firmware -ipw2200-firmware -ivtv-firmware -iwl100-firmware -iwl1000-firmware -iwl3945-firmware -iwl4965-firmware -iwl5000-firmware -iwl5150-firmware -iwl6000-firmware -iwl6000g2a-firmware -iwl6050-firmware -libertas-usb8388-firmware -ql2100-firmware -ql2200-firmware -ql23xx-firmware -ql2400-firmware -ql2500-firmware -rt61pci-firmware -rt73usb-firmware -xorg-x11-drv-ati-firmware -zd1211-firmware %end ### Post-installation commands. %post dnf makecache dnf install -y epel-release dnf makecache dnf install -y cloud-init dnf clean all touch /etc/cloud/cloud-init.disabled echo "Completed cloud-init step!" echo "${build_username} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/${build_username} sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers %end ### Reboot after the installation is complete. ### --eject attempt to eject the media before rebooting. reboot --eject