From eac39fe02eeb31b1ad7d6fd93811823d470bdbdb Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 18 Oct 2023 11:44:19 +0200 Subject: [PATCH] Aligning all kickstart files. --- .gitlab-ci.yml | 4 +-- templates/el7-standard.ks | 49 +++++++++++++++++++++++++++++-- templates/el8-standard.ks | 61 +++++++++++++++++++++++++++++++++++++-- templates/el9-standard.ks | 40 +++++++++++++++---------- 4 files changed, 130 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c51420e..30c611a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,8 +61,8 @@ variables: LC_ALL: $JOB_LANGUAGE SYSTEM_STATUS: 'unknown' CONFIG_FILE: 'etc/create-vmware-template.ini' - ROOT_PASSWORD: 'blablub' - SWAP_SPACE_MB: 512 + ROOT_PASSWORD: 'uhu-banane' + SWAP_SPACE_MB: 1024 COBBLER_DISTRO: 'RHEL-9.2-x86_64' COBBLER_HOST: '' COBBLER_HOST_PROD: 'prd-cobbler01.pixelpark.com' diff --git a/templates/el7-standard.ks b/templates/el7-standard.ks index 6b08003..e80f0ae 100644 --- a/templates/el7-standard.ks +++ b/templates/el7-standard.ks @@ -34,9 +34,6 @@ selinux --permissiv # Do not configure the X Window System skipx -# Installation logging level -logging --level=debug - # Reboot after installation reboot @@ -94,6 +91,19 @@ echo echo "Used /etc/resolv.conf:" cat /etc/resolv.conf +echo +echo "Linux uname:" +uname -a + +echo +echo "Linux kernel versions:" +rpm -qa | grep -i kernel | sort -i + +echo +echo "Devices:" +echo +ls -lA /dev/disk/*/ + #end raw %end @@ -101,7 +111,13 @@ cat /etc/resolv.conf # Pre installation tasks %pre-install --interpreter=/bin/bash --log=/var/log/ks-pre-install.log #raw +echo +echo "###########################################################" +echo "Pre install tasks ..." +echo + echo "[$( date --rfc-3339=seconds )]: Pre installation tasks ..." + #end raw %end @@ -124,6 +140,12 @@ exec < /dev/console &> >(tee -a "$POST_LOG") ### debug # set -x +#raw +echo +echo "###########################################################" +echo "Post install tasks ..." +echo + echo "cobbler profile = $profile_name" echo @@ -164,6 +186,27 @@ if [[ -d "/etc/yum.repos.d" ]] ; then fi +echo +echo "------------------" +echo "Linux kernel versions:" +rpm -qa | grep -i kernel | sort -i + +echo +echo "------------------" +echo "LVM:" + +echo +echo "pvs" +pvs --units m + +echo +echo "vgs" +vgs --units m + +echo +echo "lvs" +lvs --units m +#end raw ### remove unnecessary directory rm -rf /var/var diff --git a/templates/el8-standard.ks b/templates/el8-standard.ks index 0e8bddb..6840431 100644 --- a/templates/el8-standard.ks +++ b/templates/el8-standard.ks @@ -34,9 +34,6 @@ selinux --permissiv # Do not configure the X Window System skipx -# Installation logging level -logging --level=debug - # Reboot after installation reboot @@ -78,6 +75,11 @@ logvol /var/log --vgname=vgroot --name=log --size=3072 # Pre tasks %pre --interpreter=/bin/bash --log=/var/log/ks-pre.log #raw + +echo +echo "###########################################################" +echo "Pre-all tasks ..." +echo echo "[$( date --rfc-3339=seconds )]: Let's launch the missle ..." echo if grep '^nameserver' /etc/resolv.conf >/dev/null ; then @@ -94,6 +96,19 @@ echo echo "Used /etc/resolv.conf:" cat /etc/resolv.conf +echo +echo "Linux uname:" +uname -a + +echo +echo "Linux kernel versions:" +rpm -qa | grep -i kernel | sort -i + +echo +echo "Devices:" +echo +ls -lA /dev/disk/*/ + #end raw %end @@ -101,7 +116,13 @@ cat /etc/resolv.conf # Pre installation tasks %pre-install --interpreter=/bin/bash --log=/var/log/ks-pre-install.log #raw +echo +echo "###########################################################" +echo "Pre install tasks ..." +echo + echo "[$( date --rfc-3339=seconds )]: Pre installation tasks ..." + #end raw %end @@ -124,6 +145,12 @@ exec < /dev/console &> >(tee -a "$POST_LOG") ### debug # set -x +#raw +echo +echo "###########################################################" +echo "Post install tasks ..." +echo + echo "cobbler profile = $profile_name" echo @@ -164,6 +191,34 @@ if [[ -d "/etc/yum.repos.d" ]] ; then fi +echo +echo "------------------" +echo "Linux kernel versions:" +rpm -qa | grep -i kernel | sort -i + +echo +echo "------------------" +echo "Default kernel in GRUB:" +grubby --default-index +grubby --default-title +grubby --default-kernel + +echo +echo "------------------" +echo "LVM:" + +echo +echo "pvs" +pvs --units m + +echo +echo "vgs" +vgs --units m + +echo +echo "lvs" +lvs --units m +#end raw ### remove unnecessary directory rm -rf /var/var diff --git a/templates/el9-standard.ks b/templates/el9-standard.ks index 6026b6b..6c14bd8 100644 --- a/templates/el9-standard.ks +++ b/templates/el9-standard.ks @@ -14,7 +14,7 @@ url --url="{{ distro.ks_repo_url }}" --noverifyssl sshpw --username=inst testtest --plaintext # Root install-password -rootpw --iscrypted $6$tPpm.7Bc7.H4aoIC$ItrG9r8VDmMZxK301yGlIhTbv2ZG7cZ33m3WlAyr3NfYvb6O5fKFNtiIBRu/Ystju4lS/siTiiWCGLDI/U31p1 +rootpw --iscrypted ${ROOT_PWD_HASH} # System authorization information authselect minimal with-mkhomedir with-pwhistory without-nullok @@ -116,22 +116,12 @@ ls -lA /dev/disk/*/ # Pre installation tasks %pre-install --interpreter=/bin/bash --log=/var/log/ks-pre-install.log #raw -echo "[$( date --rfc-3339=seconds )]: Pre installation tasks ..." - echo -echo "LVM:" - +echo "###########################################################" +echo "Pre install tasks ..." echo -echo "pvs" -pvs --units m -echo -echo "vgs" -vgs --units m - -echo -echo "lvs" -lvs --units m +echo "[$( date --rfc-3339=seconds )]: Pre installation tasks ..." #end raw %end @@ -155,6 +145,7 @@ exec < /dev/console &> >(tee -a "$POST_LOG") ### debug # set -x +#raw echo echo "###########################################################" echo "Post install tasks ..." @@ -200,18 +191,34 @@ if [[ -d "/etc/yum.repos.d" ]] ; then fi -#raw echo +echo "------------------" echo "Linux kernel versions:" rpm -qa | grep -i kernel | sort -i echo +echo "------------------" echo "Default kernel in GRUB:" grubby --default-index grubby --default-title grubby --default-kernel -#end raw +echo +echo "------------------" +echo "LVM:" + +echo +echo "pvs" +pvs --units m + +echo +echo "vgs" +vgs --units m + +echo +echo "lvs" +lvs --units m +#end raw ### remove unnecessary directory rm -rf /var/var @@ -248,6 +255,7 @@ fi {% endif %} echo +echo "------------------" echo "hostname: '$hostname'" echo "system_name: '$system_name'" echo "gateway: '$gateway'" -- 2.39.5