Skip to content

Instantly share code, notes, and snippets.

@yriveiro
Last active October 31, 2017 22:05
Show Gist options
  • Save yriveiro/4c87bd3f825296cd13b8206037a3e37e to your computer and use it in GitHub Desktop.
Save yriveiro/4c87bd3f825296cd13b8206037a3e37e to your computer and use it in GitHub Desktop.
Ovirt seal script for VM template
#!/usr/bin/env bash
yum clean all
rm -rf /var/cache/yum
> /etc/machine-id
rm -f /etc/ssh/ssh_host_rm -rf /root/.ssh/
rm -f /root/anaconda-ks.cfg
rm -f /root/.bash_history
unset HISTFILE
rm -f /var/log/boot.log
rm -f /var/log/cron
rm -f /var/log/dmesg
rm -f /var/log/grubby
rm -f /var/log/lastlog
rm -f /var/log/maillog
rm -f /var/log/messages
rm -f /var/log/secure
rm -f /var/log/spooler
rm -f /var/log/tallylog
rm -f /var/log/wpa_supplicant.log
rm -f /var/log/wtmp
rm -f /var/log/yum.log
rm -f /var/log/audit/audit.log
rm -f /var/log/ovirt-guest-agent/ovirt-guest-agent.log
rm -f /var/log/tuned/tuned.log
sys-unconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment