Skip to content
Snippets Groups Projects
Verified Commit 827860d1 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Send installation logs to central server

parent 51e87a65
No related branches found
No related tags found
No related merge requests found
Pipeline #3304871 failed
......@@ -56,6 +56,34 @@ yum-plugin-ovl
%end
%pre
ARCH=`uname -m`
cat >> /etc/rsyslog.conf <<DELIM
\$template AnacondaTemplate, "<%PRI%>%TIMESTAMP:::date-rfc3339% image:cc7-base-docker-$ARCH %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%"
\$ActionForwardDefaultTemplate AnacondaTemplate
module(load="imfile" mode="inotify")
input(type="imfile"
File="/tmp/anaconda.log"
Tag="anaconda")
input(type="imfile"
File="/tmp/dnf.librepo.log"
Tag="dnf-librepo")
input(type="imfile"
File="/tmp/packaging.log"
Tag="packaging")
input(type="imfile"
File="/tmp/ks-script-*.log"
Tag="ks-pre")
input(type="imfile"
File="/mnt/sysroot/root/ks-post.log"
Tag="ks-post")
*.* @@linuxsoftadm.cern.ch:5014
DELIM
/usr/bin/systemctl restart rsyslog
%end
%post --log=/root/ks-post.log
# randomize root password and lock root account
dd if=/dev/urandom count=50 | md5sum | passwd --stdin root
......@@ -205,7 +233,11 @@ SSL start_tls
SASL_NOCANON on
EOF
%end
%post --nochroot
# Make rsyslog send everything before the reboot
pkill -HUP rsyslogd
sleep 30s
rm -rf /mnt/sysroot/root/ks-post.log
%end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment