From: Reinhard Schmitz Date: Wed, 8 Nov 2023 15:53:21 +0000 (+0100) Subject: Cleanup snippets and used snippets for rhel9 X-Git-Tag: 3.2.1~18^2~2^2~1 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=6cd605049b0eb3daa921fb66ca7411b4f5d98d33;p=pixelpark%2Fcreate-vmware-tpl.git Cleanup snippets and used snippets for rhel9 --- diff --git a/etc/cobbler-distros.d/rhel-9.yaml b/etc/cobbler-distros.d/rhel-9.yaml index c79ab9c..b5340c0 100644 --- a/etc/cobbler-distros.d/rhel-9.yaml +++ b/etc/cobbler-distros.d/rhel-9.yaml @@ -69,13 +69,8 @@ cobbler-distros: - '-teamd' snippets: - 'tpl.001.basics.sh' - - 'tpl.010.authkeys.sh' - 'tpl.041.network-el9.sh' - # tweak_systemd will be removed, when the appropriate Puppet profile is working - - 'tpl.060.tweak_systemd.sh' - 'tpl.070.tweak_grub.sh' - # tmp-tmpfs will be removed, when the appropriate Puppet profile is working - - 'tpl.075.tmp-tmpfs.sh' - 'tpl.085.disable-ipv6.sh' - 'tpl.100.clear_repos.sh' - 'tpl.110.register-rhel.sh' @@ -85,6 +80,6 @@ cobbler-distros: - 'tpl.240.rc.local.sh' - 'tpl.280.dist-upgrade.sh' - 'tpl.320.root-ssh-login.sh' - - 'tpl.400.chrony.sh' + - 'tpl.400.chrony-el9.sh' - 'tpl.450.puppet.sh' - 'tpl.999.finish.sh' diff --git a/snippets/tpl.085.disable-ipv6.sh b/snippets/tpl.085.disable-ipv6.sh index 0864910..727891c 100644 --- a/snippets/tpl.085.disable-ipv6.sh +++ b/snippets/tpl.085.disable-ipv6.sh @@ -4,16 +4,15 @@ #----------------------------------------------------------- disable_ipv6() { - echo -e "\e[0Ksection_start:$( date +%s ):ks_disable_ipv6[collapsed=true]\r\e[0KDisabling IPv6 in /etc/sysctl.conf ..." + local sysctl_conf="/etc/sysctl.d/disable_ipv6.conf" + + echo -e "\e[0Ksection_start:$( date +%s ):ks_disable_ipv6[collapsed=true]\r\e[0KDisabling IPv6 in ${sysctl_conf} ..." echo echo "${HASH_LINE}" echo - log "Disabling IPv6 in /etc/sysctl.conf ..." - - local sysctl_conf="/etc/sysctl.conf" + log "Disabling IPv6 via ${sysctl_conf} ..." - echo >>"${sysctl_conf}" - echo "# Disabling IPv6" >>"${sysctl_conf}" + echo "# Disabling IPv6" >"${sysctl_conf}" echo "net.ipv6.conf.all.disable_ipv6 = 1" >>"${sysctl_conf}" echo "net.ipv6.conf.default.disable_ipv6 = 1" >>"${sysctl_conf}" echo >>"${sysctl_conf}" diff --git a/snippets/tpl.400.chrony-el9.sh b/snippets/tpl.400.chrony-el9.sh new file mode 100644 index 0000000..4c98348 --- /dev/null +++ b/snippets/tpl.400.chrony-el9.sh @@ -0,0 +1,20 @@ +## !/bin/bash +#raw + +#----------------------------------------------------------- +perform_chrony() { + + echo -e "\e[0Ksection_start:$( date +%s ):ks_perform_chrony[collapsed=true]\r\e[0KInstalling and configuring Chrony ..." + + echo "Disable chronyd since config must come from puppet ..." + systemctl disable --now chronyd.service + echo + systemctl status puppet.service + + echo -e "\e[0Ksection_end:$( date +%s ):ks_perform_chrony\r\e[0K" +} + +perform_chrony + +#end raw +## vim: ts=4 et list diff --git a/snippets/tpl.450.puppet.sh b/snippets/tpl.450.puppet.sh index 286d153..d3743ef 100644 --- a/snippets/tpl.450.puppet.sh +++ b/snippets/tpl.450.puppet.sh @@ -14,24 +14,6 @@ install_puppet() { echo log "Installing Puppet agent ..." -# echo -# echo "Creating group puppet ..." -# groupadd --system puppet -# printf "Group entry: " -# getent group puppet - -# echo -# echo "Creating user puppet ..." -# useradd --system --gid puppet \ -# --home-dir "${var_lib_dir}" --create-home \ -# --comment "Puppet configuration management" \ -# --shell /sbin/nologin \ -# puppet -# printf "User entry: " -# getent passwd puppet -# printf "User Id: " -# id puppet - echo echo "Installing puppet package ..." if yum install -y puppet-agent ; then