# This kickstart file was rendered from the Foreman provisioning template "Kickstart default". # for cory-brummel.rhos-01.prod.psi.rdu2.redhat.com running RedHat 10 x86_64 # Organization: Default Organization # Location: Default Location # Lifecycle environment: Library # Content View: r10-public-beta # Content Source: SATELLITE_URL url --url http://SATELLITE_URL/pulp/content/Default_Organization/Library/r10/content/beta/rhel10/10/x86_64/baseos/kickstart/ repo --name Red_Hat_Enterprise_Linux_10_for_x86_64_-_AppStream_Beta_Kickstart --baseurl http://SATELLITE_URL/pulp/content/Default_Organization/Library/r10/content/beta/rhel10/10/x86_64/appstream/kickstart/ lang en_US.UTF-8 selinux --enforcing keyboard us network --device=00:aa:aa:99:99:03 --hostname cory-brummel.rhos-01.prod.psi.rdu2.redhat.com --nodns rootpw --iscrypted $6$JnS0Ww5ztRmCKBoY$WqfqGW6m7s58B7qDfCT2JngcG79SnCYoxVzNkN6JA4bNzJXYNMQCIkrMOUqmYQUzBgPAVLFpq8ABclwL5uE3R0 firewall --service=ssh authselect --useshadow --passalgo=sha512 --kickstart timezone --utc UTC services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd bootloader --location=mbr --append="nofb quiet splash=quiet" zerombr clearpart --all --initlabel autopart rhsm --organization="Default_Organization" --activation-key="r10" --server-hostname SATELLITE_URL --rhsm-baseurl https://SATELLITE_URL/pulp/content --connect-to-insights skipx text reboot %packages yum chrony -ntp %end %post --nochroot exec < /dev/tty3 > /dev/tty3 chvt 3 ( chvt 1 ) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log %end %post exec < /dev/tty3 > /dev/tty3 chvt 3 ( logger "Starting anaconda cory-brummel.rhos-01.prod.psi.rdu2.redhat.com postinstall" echo "Updating system time" systemctl enable --now chronyd /usr/bin/chronyc -a makestep /usr/sbin/hwclock --systohc # update all the base packages from the updates repository if [ -f /usr/bin/dnf ]; then dnf -y update else yum -t -y update fi # Select package manager for the OS (sets the $PKG_MANAGER* variables) if [ -z "$PKG_MANAGER" ]; then if [ -f /etc/os-release ] ; then . /etc/os-release fi if [ "${NAME%.*}" = 'FreeBSD' ]; then PKG_MANAGER='pkg' PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y" PKG_MANAGER_REMOVE="${PKG_MANAGER} delete -y" PKG_MANAGER_UPGRADE="${PKG_MANAGER} install -y" elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then PKG_MANAGER='dnf' if [ -f /etc/redhat-release -a "${VERSION_ID%.*}" -le 7 ]; then PKG_MANAGER='yum' elif [ -f /etc/system-release ]; then PKG_MANAGER='yum' fi PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y" PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y" PKG_MANAGER_UPGRADE="${PKG_MANAGER} upgrade -y" elif [ -f /etc/debian_version ]; then PKG_MANAGER='apt-get' PKG_MANAGER_INSTALL="${PKG_MANAGER} install -y" PKG_MANAGER_REMOVE="${PKG_MANAGER} remove -y" PKG_MANAGER_UPGRADE="${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y" elif [ -f /etc/arch-release ]; then PKG_MANAGER='pacman' PKG_MANAGER_INSTALL="${PKG_MANAGER} --noconfirm -S" PKG_MANAGER_REMOVE="${PKG_MANAGER} --noconfirm -R" PKG_MANAGER_UPGRADE="${PKG_MANAGER} --noconfirm -S" elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then PKG_MANAGER='zypper' PKG_MANAGER_INSTALL="${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses" PKG_MANAGER_REMOVE="${PKG_MANAGER} --non-interactive remove" PKG_MANAGER_UPGRADE="${PKG_MANAGER} --non-interactive update" fi fi user_exists=false getent passwd root >/dev/null 2>&1 && user_exists=true if $user_exists; then mkdir -p ~root/.ssh cat << EOF >> ~root/.ssh/authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDpsDkGNCD1q11Sm9mWMPk6weUIKfJ7WJ2ltXvufYC/Nu56oPIJRaqhIzTPTnpVCqzBjmVSb+v9M3UkOqofv5nVqnwf8V4EMALxcpVr/fnUi0Neg0zcQrXb4aVUswGlTBL8LpsHZaUOdAIgoSb/8Tf4LseWg+w58qdciYS+T6Hxoeug7xnzoIdc/uFSRdE8t+B1j2no3MzgCMVG2GWVIeioHA3UYP+Rk8w2kujl7+2RJmiQ4ubD2mSl2PVddMmtaJoe4X4+DXI3BXIQesMElOcgGJ+cipITWS/5V/goc7g1biIvExoEdRSp1z5nh7sXdzRG8yJeGqDyTKQM2eajHCfG5dXhdJ7TDQzzWPTs1Ryl63v0JAgRw0Ct/ZZ1yoUAMakFWr8CQ07qTEvoi5JwAwj8jur+AKVyv9GY9f37qBigv672i79TGP0JaCOW9dqdzL757mbJRFqFoyrgN9H1pGLvreGChsjkVsnycr3951AxlgDC+G9E3fVlZG3fvacrXkU= foreman-proxy@ip-10-0-218-31.rhos-01.prod.psi.rdu2.redhat.com EOF chmod 0700 ~root/.ssh chmod 0600 ~root/.ssh/authorized_keys chown -R root: ~root/.ssh # Restore SELinux context with restorecon, if it's available: command -v restorecon && restorecon -RvF ~root/.ssh || true else echo 'The remote_execution_ssh_user does not exist and remote_execution_create_user is not set to true. remote_execution_ssh_keys snippet will not install keys' fi touch /tmp/foreman_built chvt 1 ) 2>&1 | tee /root/install.post.log %end # copy %pre log files into chroot %post --nochroot cp -vf /tmp/*.pre.*.log /mnt/sysimage/root/ %end %post --erroronfail --log=/root/install-callhome.post.log if test -f /tmp/foreman_built; then echo "calling home: build is done!" if [ -x /usr/bin/curl ]; then /usr/bin/curl -o /dev/null -H 'Content-Type: text/plain' --data @/root/install.post.log --noproxy \* --silent 'http://SATELLITE_URL/unattended/built?token=87be8507-6203-4257-948c-655a80c361c7' elif [ -x /usr/bin/wget ]; then /usr/bin/wget -q -O /dev/null --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log --no-proxy 'http://SATELLITE_URL/unattended/built?token=87be8507-6203-4257-948c-655a80c361c7' else wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://SATELLITE_URL/unattended/built?token=87be8507-6203-4257-948c-655a80c361c7' fi if [ -x "$(command -v subscription-manager)" ] ; then subscription-manager facts --update fi else echo "calling home: build failed!" if [ -x /usr/bin/curl ]; then /usr/bin/curl -o /dev/null -H 'Content-Type: text/plain' --data @/root/install.post.log --noproxy \* --silent 'http://SATELLITE_URL/unattended/failed?token=87be8507-6203-4257-948c-655a80c361c7' elif [ -x /usr/bin/wget ]; then /usr/bin/wget -q -O /dev/null --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log --no-proxy 'http://SATELLITE_URL/unattended/failed?token=87be8507-6203-4257-948c-655a80c361c7' else wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://SATELLITE_URL/unattended/failed?token=87be8507-6203-4257-948c-655a80c361c7' fi if [ -x "$(command -v subscription-manager)" ] ; then subscription-manager facts --update fi fi sync %end