]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Fixing some snippets, package lists and post actions.
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 1 Nov 2023 16:51:32 +0000 (17:51 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 1 Nov 2023 16:51:32 +0000 (17:51 +0100)
etc/cobbler-distros.d/rhel-9.yaml
lib/cr_vmware_tpl/handler/vm.py
snippets/tpl.075.tmp-tmpfs.sh
snippets/tpl.110.register-rhel.sh
snippets/tpl.450.puppet.sh

index 7ee569c2497cf1a0fc8cc2bd271fd6b720fd2fe1..0afa1b081331ef415efa824e089ab5d5e03bb68a 100644 (file)
@@ -38,7 +38,7 @@ cobbler-distros:
       - 'tmux'
       # - 'traceroute'
       - 'vim'
-      - 'wget'
+      - 'wget'
       # - 'yum-utils'
       - '-abrt*'
       - '-iwl*'
@@ -55,7 +55,7 @@ cobbler-distros:
         # tmp-tmpfs will be removed, when the appropriate Puppet profile is working
       - 'tpl.075.tmp-tmpfs.sh'
       # - 'tpl.080.rsyslogd-el9.sh'
-      - 'tpl.085.disable-ipv6.sh'
+      - 'tpl.085.disable-ipv6.sh'
       - 'tpl.100.clear_repos.sh'
       - 'tpl.110.register-rhel.sh'
       - 'tpl.190.repos_rhel9.sh'
index b74c62ddfb1373785cebd224fa75ae7dbaa59846..ba8e0b4e4543a5f9824f4fec8ba72fc2b8d412c2 100644 (file)
@@ -302,6 +302,16 @@ class HandlerVmMixin():
         printf "Current host FQDN: "
         hostname -f
 
+        echo
+        echo "All installed packages:"
+        echo "-----------------------"
+        rpm -qa | sort
+
+        echo
+        echo "All filesystems:"
+        echo "----------------"
+        df -m -a -T
+
         for ks_cfg in "/root/original-ks.cfg" "/root/anaconda-ks.cfg" ; do
             echo
             echo "-----------------------------------------------------------"
index ba397041c051ac488d87c256bf5d1500c5dbfa1d..f0d54e20a4c40133acfce1a8a16a90d77fe946c6 100644 (file)
@@ -4,37 +4,19 @@
 #-----------------------------------------------------------
 setup_tmp_tmpfs() {
 
-    echo -e "\e[0Ksection_start:$( date +%s ):ks_setup_tmp_tmpfs[collapsed=true]\r\e[0KSetting up /tmp as a tmpfs ..."
+    local fstab="/etc/fstab"
+    if [[ -f "${fstab}" ]] ; then
 
-    local unit_file="/etc/systemd/system/tmp.mount"
-    echo
-    echo "Creating a systemd unit file '${unit_file}' providing a temp filesystem below /tmp"
+        echo -e "\e[0Ksection_start:$( date +%s ):ks_setup_tmp_tmpfs[collapsed=true]\r\e[0KSetting up /tmp as a tmpfs ..."
+        echo
+        echo "${HASH_LINE}"
+        echo
+        log "Setting up /tmp as a tmpfs in '${fstab}' ..."
 
-    cat > "${unit_file}" <<-EOF
-       # Unit file for creating a temp filesystem below /tmp
+        echo 'tmpfs    /tmp    tmpfs   nosuid,size=10% 0       0' >>"${fstab}"
 
-       [Unit]
-       Description=Creating a temporary filesystem below /tmp
-       Before=local-fs.target
-
-       [Install]
-       WantedBy=local-fs.target
-
-       [Mount]
-       What=tmpfs
-       Where=/tmp
-       Type=tmpfs
-       Options=nosuid,size=10%%
-
-       EOF
-
-    echo
-    echo "Content of '${unit_file}':"
-    echo "---------- snip ----------"
-    cat "${unit_file}"
-    echo "---------- snip ----------"
-
-    echo -e "\e[0Ksection_end:$( date +%s ):ks_setup_tmp_tmpfs\r\e[0K"
+        echo -e "\e[0Ksection_end:$( date +%s ):ks_setup_tmp_tmpfs\r\e[0K"
+    fi
 
 }
 setup_tmp_tmpfs
index 77ea16db54ba539a92cffc579c67cc89310ebc1f..2a18e1b13ca5040e38667dc47a15f3eaf6d046bb 100644 (file)
@@ -20,6 +20,8 @@ register_rhel() {
         err_msg="Either RHSM_USER or RHSM_PWD are not defined as meta variables."
     else
         if [[ -x "${rhsm}" ]] ; then
+            echo
+            echo "Executing: ${cmd}"
             if [[ -n "${rhsm_system_id}" ]] ; then
                 if eval ${cmd} --consumerid "${rhsm_system_id}" ; then
                     rhsm_registred='y'
@@ -41,9 +43,12 @@ register_rhel() {
         log "System '${fqdn}' successful registred at RedHat Subscription Management."
         echo
         echo "Subscription Management Idendity:"
+        echo "Executing: ${rhsm} identity"
         ${rhsm} identity
         echo
+        echo "Executing: ${rhsm} list --consumed"
         ${rhsm} list --consumed
+        echo
     else
         log "Could not register system '$( hostname -f )' at RedHat Subscription Management: ${err_msg}"
     fi
index e512db1f1b63f2a373de5b78516e1e29e6831581..223847a418aa7d8132ec2167d133e009b875bc0d 100644 (file)
@@ -17,6 +17,7 @@ install_puppet() {
     echo
     echo "Creating group puppet ..."
     groupadd --system puppet
+    printf "Group entry: "
     getent group puppet
 
     echo
@@ -26,7 +27,9 @@ install_puppet() {
             --comment "Puppet configuration management" \
             --shell /sbin/nologin \
             puppet
+    printf "User entry: "
     getent passwd puppet
+    printf "User Id: "
     id puppet
 
     echo