]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Cleanup snippets and used snippets for rhel9
authorReinhard Schmitz <reinhard.schmitz@pixelpark.com>
Wed, 8 Nov 2023 15:53:21 +0000 (16:53 +0100)
committerReinhard Schmitz <reinhard.schmitz@pixelpark.com>
Wed, 8 Nov 2023 17:15:13 +0000 (18:15 +0100)
etc/cobbler-distros.d/rhel-9.yaml
snippets/tpl.085.disable-ipv6.sh
snippets/tpl.400.chrony-el9.sh [new file with mode: 0644]
snippets/tpl.450.puppet.sh

index c79ab9c8566559adbd6d467640ed6705b83b8a2f..b5340c0a12b5221466dd427d853b29b9fb89a0fa 100644 (file)
@@ -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'
index 08649100dbb396fc5b12928ee69ceb6ed56beede..727891c91d608a3b5fee9d44783cefb6f050d37c 100644 (file)
@@ -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 (file)
index 0000000..4c98348
--- /dev/null
@@ -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
index 286d1536125ae47885e407a61da501311dc81ec0..d3743effb13ac17379cce6cc390ff7b244268004 100644 (file)
@@ -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