]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
More cleaning up.
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 8 Nov 2023 12:50:29 +0000 (13:50 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 8 Nov 2023 12:50:29 +0000 (13:50 +0100)
etc/cobbler-distros.d/centos-7.yaml
etc/cobbler-distros.d/centos-stream-8.yaml
etc/cobbler-distros.d/oel-7.yaml
etc/cobbler-distros.d/rhel-9.yaml
lib/cr_vmware_tpl/handler/vm.py

index 72034d31895a386f760d62b0a1cfdcb36d77f9e9..f817599460be91e714d9122f29d05302a73c3c36 100644 (file)
@@ -21,32 +21,20 @@ cobbler-distros:
       - '@base'
       - 'bash-completion'
       - 'bc'
-      # - 'bind-utils'
       - 'chrony'
       - 'curl'
-      # - 'git'
-      # - 'iotop'
       - 'lsof'
-      # - 'mailx'
       - 'man'
-      # - 'mlocate'
       - 'net-tools'
-      # - 'postfix'
       - 'psmisc'
-      # - 'rsync'
-      # - 'strace'
-      # - 'sysstat'
-      # - 'tcpdump'
-      # - 'telnet'
       - 'tmux'
-      # - 'traceroute'
       - 'vim'
       - 'wget'
-      # - 'yum-utils'
       - '-iwl*'
       - '-mysql-community*'
       - '-nfs*'
       - '-rpcbind'
+      - '-sysstat'
     snippets:
       - 'tpl.001.basics.sh'
       - 'tpl.010.authkeys.sh'
@@ -54,21 +42,16 @@ cobbler-distros:
       - 'tpl.060.tweak_systemd.sh'
       - 'tpl.070.tweak_grub.sh'
       - 'tpl.074.tmp-tmpfs-el7.sh'
-        # - 'tpl.080.rsyslogd-el7.sh'
       - 'tpl.085.disable-ipv6.sh'
       - 'tpl.100.clear_repos.sh'
       - 'tpl.170.repos_centos7.sh'
       - 'tpl.175.repos_el7.sh'
       - 'tpl.200.init-repos.sh'
-        # - 'tpl.205.bashrc-el7.sh'
       - 'tpl.225.vimrc-el7.sh'
       - 'tpl.250.pkgs-el7.sh'
       - 'tpl.280.dist-upgrade.sh'
-        # - 'tpl.300.create-motd.sh'
       - 'tpl.320.root-ssh-login.sh'
       - 'tpl.400.chrony.sh'
       - 'tpl.450.puppet.sh'
-        # - 'tpl.470.postfix.sh'
-        # - 'tpl.500.logrotate.sh'
       - 'tpl.999.finish.sh'
 
index 8c7522bea4c605765c533cd79652db0b58ef61eb..4333408dc43c2a668cd510dfacbb915fb2191f8b 100644 (file)
@@ -25,33 +25,18 @@ cobbler-distros:
       - 'NetworkManager-config-server'
       - 'bash-completion'
       - 'bc'
-      # - 'bind-utils'
       - 'chrony'
       - 'cloud-init'
       - 'curl'
       - 'dbus'
-      # - 'git'
-      # - 'grubby'
-      # - 'iotop'
-      # - 'langpacks-de'
       - 'lsof'
-      # - 'mailx'
       - 'man'
-      # - 'mlocate'
       - 'net-tools'
       - 'oddjob-mkhomedir'
-      # - 'postfix'
       - 'psmisc'
-      # - 'rsync'
-      # - 'strace'
-      # - 'sysstat'
-      # - 'tcpdump'
-      # - 'telnet'
       - 'tmux'
-      # - 'traceroute'
       - 'vim'
       - 'wget'
-      # - 'yum-utils'
       - '-abrt*'
       - '-iwl*'
       - '-nfs*'
@@ -63,22 +48,16 @@ cobbler-distros:
       - 'tpl.060.tweak_systemd.sh'
       - 'tpl.070.tweak_grub.sh'
       - 'tpl.075.tmp-tmpfs.sh'
-      # - 'tpl.080.rsyslogd-el8.sh'
       - 'tpl.085.disable-ipv6.sh'
       - 'tpl.100.clear_repos.sh'
       - 'tpl.180.repos_centos8.sh'
       - 'tpl.185.repos_el8.sh'
       - 'tpl.200.init-repos.sh'
-      # - 'tpl.210.bashrc-el8.sh'
-      # - 'tpl.220.locales-el8.sh'
       - 'tpl.230.vimrc-el8.sh'
       - 'tpl.250.pkgs-el8.sh'
       - 'tpl.280.dist-upgrade.sh'
-      # - 'tpl.300.create-motd.sh'
       - 'tpl.320.root-ssh-login.sh'
       - 'tpl.400.chrony.sh'
       - 'tpl.450.puppet.sh'
-      # - 'tpl.470.postfix.sh'
-      # - 'tpl.500.logrotate.sh'
       - 'tpl.999.finish.sh'
 
index 3706795a111184104afe934cb68378831a22b1da..75aea0642287ecde636a1a377bd742b3d8bed3ce 100644 (file)
@@ -25,32 +25,20 @@ cobbler-distros:
       - '@base'
       - 'bash-completion'
       - 'bc'
-      # - 'bind-utils'
       - 'chrony'
       - 'curl'
-      # - 'git'
-      # - 'iotop'
       - 'lsof'
-      # - 'mailx'
       - 'man'
-      # - 'mlocate'
       - 'net-tools'
-      # - 'postfix'
       - 'psmisc'
-      # - 'rsync'
-      # - 'strace'
-      # - 'sysstat'
-      # - 'tcpdump'
-      # - 'telnet'
       - 'tmux'
-      # - 'traceroute'
       - 'vim'
       - 'wget'
-      # - 'yum-utils'
       - '-iwl*'
       - '-mysql-community*'
       - '-nfs*'
       - '-rpcbind'
+      - '-sysstat'
       - '-*uek*'
     snippets:
       - 'tpl.001.basics.sh'
@@ -59,21 +47,16 @@ cobbler-distros:
       - 'tpl.060.tweak_systemd.sh'
       - 'tpl.070.tweak_grub.sh'
       - 'tpl.074.tmp-tmpfs-el7.sh'
-        # - 'tpl.080.rsyslogd-el7.sh'
       - 'tpl.085.disable-ipv6.sh'
       - 'tpl.100.clear_repos.sh'
       - 'tpl.170.repos_oel7.sh'
       - 'tpl.175.repos_el7.sh'
       - 'tpl.200.init-repos.sh'
-        # - 'tpl.205.bashrc-el7.sh'
       - 'tpl.225.vimrc-el7.sh'
       - 'tpl.250.pkgs-el7.sh'
       - 'tpl.270.remove-uek.sh'
       - 'tpl.280.dist-upgrade.sh'
-        # - 'tpl.300.create-motd.sh'
       - 'tpl.320.root-ssh-login.sh'
       - 'tpl.400.chrony.sh'
       - 'tpl.450.puppet.sh'
-        # - 'tpl.470.postfix.sh'
-        # - 'tpl.500.logrotate.sh'
       - 'tpl.999.finish.sh'
index 0afa1b081331ef415efa824e089ab5d5e03bb68a..b6b86bd5c3c61f51fe986e0b23d069f882b660e3 100644 (file)
@@ -14,39 +14,25 @@ cobbler-distros:
       - 'NetworkManager-config-server'
       - 'bash-completion'
       - 'bc'
-      # - 'bind-utils'
       - 'chrony'
       - 'cloud-init'
       - 'curl'
       - 'dbus'
-      # - 'grubby'
-      # - 'iotop'
       - 'kexec-tools'
-      # - 'langpacks-de'
       - 'lsof'
       - 'man'
-      # - 'mlocate'
       - 'net-tools'
       - 'oddjob-mkhomedir'
       - 'psmisc'
-      # - 'rsync'
-      # - 's-nail'
-      # - 'strace'
-      # - 'sysstat'
-      # - 'tcpdump'
-      # - 'telnet'
       - 'tmux'
-      # - 'traceroute'
       - 'vim'
       - 'wget'
-      # - 'yum-utils'
       - '-abrt*'
       - '-iwl*'
       - '-nfs*'
       - '-rpcbind'
     snippets:
       - 'tpl.001.basics.sh'
-      # - 'tpl.005.update_resolvconf.sh'
       - 'tpl.010.authkeys.sh'
       - 'tpl.041.network-el9.sh'
         # tweak_systemd will be removed, when the appropriate Puppet profile is working
@@ -54,21 +40,15 @@ cobbler-distros:
       - 'tpl.070.tweak_grub.sh'
         # 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.100.clear_repos.sh'
       - 'tpl.110.register-rhel.sh'
       - 'tpl.190.repos_rhel9.sh'
       - 'tpl.195.repos_el9.sh'
       - 'tpl.200.init-repos.sh'
-      # - 'tpl.211.bashrc-el9.sh'
-      # - 'tpl.221.locales-el9.sh'
       - 'tpl.231.vimrc-centos9.sh'
-      # - 'tpl.250.pkgs-el9.sh'
       - 'tpl.280.dist-upgrade.sh'
-      # - 'tpl.300.create-motd.sh'
       - 'tpl.320.root-ssh-login.sh'
       - 'tpl.400.chrony.sh'
       - 'tpl.450.puppet.sh'
-      # - 'tpl.500.logrotate.sh'
       - 'tpl.999.finish.sh'
index 8d5737c26a158dca5947a0335a6fa6a5bfea4476..3421b6f7eb6fcec449d65e65462e4694d59b8a55 100644 (file)
@@ -292,6 +292,7 @@ class HandlerVmMixin():
             '/var/log/cloud-init-output.log',
             '/var/log/cron',
             '/var/log/dnf*.log',
+            '/var/log/grubby*',
             '/var/log/hawkey.log',
             '/var/log/messages',
             '/var/log/secure',
@@ -350,7 +351,8 @@ class HandlerVmMixin():
         echo
         echo "-----------------------------------------------------------"
         echo "Clearing journal log ..."
-        journalctl --rotate --vacuum-time=2s
+        journalctl --flush
+        journalctl -m --vacuum-time=1s
 
         echo
         echo "-----------------------------------------------------------"
@@ -438,14 +440,19 @@ class HandlerVmMixin():
         echo
         echo "-----------------------------------------------------------"
         echo "Clearing journal log ..."
-        journalctl --rotate --vacuum-time=2s
+        journalctl --flush
+        systemctl stop systemd-journald.socket
+        systemctl stop systemd-journald.service
+        rm -rfv /var/log/journal/*
 
         echo
         echo "-----------------------------------------------------------"
         echo "Truncating /var/log/*tmp and /var/log/messages ..."
+        systemctl stop rsyslog.service
         cp -v /dev/null /var/log/btmp
         cp -v /dev/null /var/log/wtmp
         cp -v /dev/null /var/log/messages
+        cp -v /dev/null /var/log/dmesg
 
         echo
         echo "Sleeping some seconds ..."