#version=RHEL9 # Reboot after installation reboot # Use text mode install text # Installation logging level %post cat << 'EOF' > /root/.vimrc set background=dark syntax on EOF cat << 'EOF' > /etc/skel/.vimrc set background=dark syntax on EOF # Required for PXE installs, otherwise the system does not boot CURKER=$(grubby --default-kernel) grubby --info=${CURKER} > /tmp/args yum update -y NEWKER=$(grubby --default-kernel) source /tmp/args grubby --args="root=/dev/mapper/rockyvg-root ${args}" --update-kernel="${NEWKER}" grubby --remove-args="inst.repo inst.stage2 ip inst.ks" --update-kernel="${NEWKER}" hostname > /etc/hostname wget -q -O /tmp/fullNetSetup.sh http://10.100.0.1/fullNetSetup.sh wget -q -O /usr/local/bin/setToStatic.sh http://10.100.0.1/setToStatic.sh bash /tmp/fullNetSetup.sh usermod -aG wheel nazu # SUDO cat << 'EOF' > /etc/sudoers.d/ansible ansible ALL=(ALL) NOPASSWD: ALL EOF chmod 440 /etc/sudoers.d/ansible # Ansible key mkdir /home/ansible/.ssh chmod 700 /home/ansible/.ssh cat << 'EOF' > /home/ansible/.ssh/authorized_keys ssh-rsa ... ssh-ed25519 ... EOF chmod 600 /home/ansible/.ssh/authorized_keys chown -R ansible:ansible /home/ansible/.ssh yum config-manager --set-enabled crb init 6 reboot %end %packages --ignoremissing -iwl*-firmware -plymouth* -selinux-policy* -xkeyboard-config grub2-efi-x64 grub2-efi-x64-modules grub2-tools-efi efibootmgr shim-x64 glibc-all-langpacks epel-release salt-minion %end # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # Network information network --bootproto=dhcp # Use network installation url --url="http://dl.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os" # Required for EPEL repo --name="CRB" --baseurl=http://dl.rockylinux.org/pub/rocky/9/CRB/x86_64/os --cost=300 # Required for rpaste repo --name="extras" --baseurl=http://dl.rockylinux.org/pub/rocky/9/extras/x86_64/os --cost=300 # Required for epel related packages repo --name="epel" --baseurl=https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/ --cost=300 firstboot --disable # Do not configure the X Window System skipx clearpart --all --initlabel --drives=sda # Disk partitioning information part /boot --fstype="xfs" --ondisk=sda --size=1024 part /boot/efi --fstype="efi" --ondisk=sda --size=600 --fsoptions="umask=0077,shortname=winnt" part pv.111 --fstype="lvmpv" --ondisk=sda --size=32776 volgroup rockyvg --pesize=4096 pv.111 logvol / --fstype="xfs" --size=8192 --name=root --vgname=rockyvg logvol /var/log/audit --fstype="xfs" --size=4096 --name=audit --vgname=rockyvg logvol /home --fstype="xfs" --size=4096 --name=home --vgname=rockyvg --fsoptions="nodev" logvol swap --fstype="swap" --size=4096 --name=swap --vgname=rockyvg logvol /tmp --fstype="xfs" --size=4096 --name=tmp --vgname=rockyvg --fsoptions="nodev,noexec,nosuid" logvol /var --fstype="xfs" --size=4096 --name=var --vgname=rockyvg logvol /var/log --fstype="xfs" --size=4096 --name=log --vgname=rockyvg # System timezone timezone US/Arizona --utc # Root password rootpw --iscrypted ... user --name=nazu --password=... --iscrypted --uid=1000 --gecos="Louis Abel" --gid=1000 user --name=ansible --uid=1100 --lock --gecos="Ansible Manager" --gid=1100 %addon com_redhat_kdump --enable --reserve-mb='auto' %end