From: Frank Brehm Date: Fri, 7 Jan 2022 12:54:48 +0000 (+0100) Subject: Adding Gitlab job log sections X-Git-Tag: 2.3.3^2~1 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=edf5aa0c8f727272979c80e96df484f80780d05b;p=pixelpark%2Fcreate-vmware-tpl.git Adding Gitlab job log sections --- diff --git a/snippets/tpl.040.network.sh b/snippets/tpl.040.network.sh index 34fe130..12ea0fe 100644 --- a/snippets/tpl.040.network.sh +++ b/snippets/tpl.040.network.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- create_networkconfig() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_create_networkconfig[collapsed=true]\r\e[0KGenerating network configuration ..." echo echo "${HASH_LINE}" echo @@ -68,6 +69,7 @@ create_networkconfig() { echo "Inhalt von /etc/sysconfig/network-scripts ..." ls -lA /etc/sysconfig/network-scripts + echo -e "\e[0Ksection_end:$( date +%s ):ks_create_networkconfig\r\e[0K" } create_networkconfig diff --git a/snippets/tpl.060.tweak_systemd.sh b/snippets/tpl.060.tweak_systemd.sh index 06f37a8..abafd73 100644 --- a/snippets/tpl.060.tweak_systemd.sh +++ b/snippets/tpl.060.tweak_systemd.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- tweak_systemd() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_tweak_systemd[collapsed=true]\r\e[0KTweaking systemd ..." echo echo "${HASH_LINE}" echo @@ -28,6 +29,7 @@ tweak_systemd() { ln -sv "${getty_svc}" "${glink}" done + echo -e "\e[0Ksection_end:$( date +%s ):ks_tweak_systemd\r\e[0K" } tweak_systemd diff --git a/snippets/tpl.070.tweak_grub.sh b/snippets/tpl.070.tweak_grub.sh index 5d0b629..06b924a 100644 --- a/snippets/tpl.070.tweak_grub.sh +++ b/snippets/tpl.070.tweak_grub.sh @@ -7,6 +7,7 @@ tweak_grub() { local grub_cfg="/etc/default/grub" if [[ -f "${grub_cfg}" ]] ; then + echo -e "\e[0Ksection_start:$( date +%s ):ks_tweak_grub[collapsed=true]\r\e[0KTweaking grub ..." echo echo "${HASH_LINE}" echo @@ -26,6 +27,7 @@ tweak_grub() { echo "Recreating /boot/grub2/grub.cfg ..." grub2-mkconfig -o /boot/grub2/grub.cfg + echo -e "\e[0Ksection_end:$( date +%s ):ks_tweak_grub\r\e[0K" fi } diff --git a/snippets/tpl.075.tmp-tmpfs.sh b/snippets/tpl.075.tmp-tmpfs.sh index ff8ae00..f0d54e2 100644 --- a/snippets/tpl.075.tmp-tmpfs.sh +++ b/snippets/tpl.075.tmp-tmpfs.sh @@ -7,6 +7,7 @@ setup_tmp_tmpfs() { local fstab="/etc/fstab" if [[ -f "${fstab}" ]] ; then + 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 @@ -14,6 +15,7 @@ setup_tmp_tmpfs() { echo 'tmpfs /tmp tmpfs nosuid,size=10% 0 0' >>"${fstab}" + echo -e "\e[0Ksection_end:$( date +%s ):ks_setup_tmp_tmpfs\r\e[0K" fi } diff --git a/snippets/tpl.080.rsyslogd-el7.sh b/snippets/tpl.080.rsyslogd-el7.sh index b7b8430..7e4bb6a 100644 --- a/snippets/tpl.080.rsyslogd-el7.sh +++ b/snippets/tpl.080.rsyslogd-el7.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_rsyslogd_el7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_rsyslogd_el7[collapsed=true]\r\e[0KConfiguring Rsyslogd ..." echo echo "${HASH_LINE}" echo "Calling set_rsyslogd_el7() ..." @@ -53,6 +54,7 @@ set_rsyslogd_el7() { echo ls -l /etc/rsyslog.conf* /etc/rsyslog.d/* + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_rsyslogd_el7\r\e[0K" } set_rsyslogd_el7 diff --git a/snippets/tpl.080.rsyslogd-el8.sh b/snippets/tpl.080.rsyslogd-el8.sh index 30d30d4..90dfb2c 100644 --- a/snippets/tpl.080.rsyslogd-el8.sh +++ b/snippets/tpl.080.rsyslogd-el8.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_rsyslogd_el8() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_rsyslogd_el8[collapsed=true]\r\e[0KConfiguring Rsyslogd ..." echo echo "${HASH_LINE}" echo "Calling set_rsyslogd_el8() ..." @@ -53,6 +54,7 @@ set_rsyslogd_el8() { echo ls -l /etc/rsyslog.conf* /etc/rsyslog.d/* + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_rsyslogd_el8\r\e[0K" } set_rsyslogd_el8 diff --git a/snippets/tpl.100.clear_repos.sh b/snippets/tpl.100.clear_repos.sh index a638d2c..4468a37 100644 --- a/snippets/tpl.100.clear_repos.sh +++ b/snippets/tpl.100.clear_repos.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- clear_all_repo_files() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_clear_all_repo_files[collapsed=true]\r\e[0KCleaning all exiting repo files ..." echo echo "${HASH_LINE}" echo @@ -24,6 +25,7 @@ clear_all_repo_files() { cp -v /dev/null "${repo_file}" done + echo -e "\e[0Ksection_end:$( date +%s ):ks_clear_all_repo_files\r\e[0K" } clear_all_repo_files diff --git a/snippets/tpl.170.repos_centos7.sh b/snippets/tpl.170.repos_centos7.sh index 9db7076..51baddf 100644 --- a/snippets/tpl.170.repos_centos7.sh +++ b/snippets/tpl.170.repos_centos7.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- get_repos_centos7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_get_repos_centos7[collapsed=true]\r\e[0KGet yum repository files ..." echo echo "${HASH_LINE}" echo "Calling get_repos_centos7() ..." @@ -26,6 +27,7 @@ get_repos_centos7() { rm -fv "${tmp_file}" done + echo -e "\e[0Ksection_end:$( date +%s ):ks_get_repos_centos7\r\e[0K" } get_repos_centos7 diff --git a/snippets/tpl.170.repos_el7.sh b/snippets/tpl.170.repos_el7.sh index cb800a3..48ab4a1 100644 --- a/snippets/tpl.170.repos_el7.sh +++ b/snippets/tpl.170.repos_el7.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- get_repos_el7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_get_repos_el7[collapsed=true]\r\e[0KGet yum repository files ..." echo echo "${HASH_LINE}" echo "Calling get_repos_el7() ..." @@ -26,6 +27,7 @@ get_repos_el7() { rm -fv "${tmp_file}" done + echo -e "\e[0Ksection_end:$( date +%s ):ks_get_repos_el7\r\e[0K" } get_repos_el7 diff --git a/snippets/tpl.170.repos_oel7.sh b/snippets/tpl.170.repos_oel7.sh index 1ceb136..3b1dcad 100644 --- a/snippets/tpl.170.repos_oel7.sh +++ b/snippets/tpl.170.repos_oel7.sh @@ -2,11 +2,12 @@ #raw #----------------------------------------------------------- -get_repos_centos7() { +get_repos_oel7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_get_repos_oel7[collapsed=true]\r\e[0KGet yum repository files ..." echo echo "${HASH_LINE}" - echo "Calling get_repos_centos7() ..." + echo "Calling get_repos_oel7() ..." echo local base_url="${COBBLER_URL}/${ws_rel_filesdir}/${system_status}/repos/oel7" @@ -26,7 +27,8 @@ get_repos_centos7() { rm -fv "${tmp_file}" done + echo -e "\e[0Ksection_end:$( date +%s ):ks_get_repos_oel7\r\e[0K" } -get_repos_centos7 +get_repos_oel7 #end raw diff --git a/snippets/tpl.200.init-repos.sh b/snippets/tpl.200.init-repos.sh index 6cd9863..0d5ad76 100644 --- a/snippets/tpl.200.init-repos.sh +++ b/snippets/tpl.200.init-repos.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- init_yum_repos() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_init_yum_repos[collapsed=true]\r\e[0KInit yum repositories ..." echo echo "${HASH_LINE}" echo @@ -12,6 +13,7 @@ init_yum_repos() { yum clean all yum makecache + echo -e "\e[0Ksection_end:$( date +%s ):ks_init_yum_repos\r\e[0K" } init_yum_repos diff --git a/snippets/tpl.205.bashrc-el7.sh b/snippets/tpl.205.bashrc-el7.sh index 7ea934e..37e7c2b 100644 --- a/snippets/tpl.205.bashrc-el7.sh +++ b/snippets/tpl.205.bashrc-el7.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_bashrc_el7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_bashrc_el7[collapsed=true]\r\e[0KRewriting /etc/bashrc ..." echo echo "${HASH_LINE}" echo "Calling set_bashrc_el7() ..." @@ -30,6 +31,7 @@ set_bashrc_el7() { echo "[$(date)]: Could not install bash-completion" | tee -a "${ERROR_POINTER}" fi + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_bashrc_el7\r\e[0K" } set_bashrc_el7 diff --git a/snippets/tpl.210.bashrc-centos8.sh b/snippets/tpl.210.bashrc-centos8.sh index 9c8ef4d..d2dd3a3 100644 --- a/snippets/tpl.210.bashrc-centos8.sh +++ b/snippets/tpl.210.bashrc-centos8.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_bashrc_centos8() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_bashrc_centos8[collapsed=true]\r\e[0KRewriting /etc/bashrc ..." echo echo "${HASH_LINE}" echo "Calling set_bashrc_centos8() ..." @@ -30,6 +31,7 @@ set_bashrc_centos8() { echo "[$(date)]: Could not install bash-completion" | tee -a "${ERROR_POINTER}" fi + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_bashrc_centos8\r\e[0K" } set_bashrc_centos8 diff --git a/snippets/tpl.220.locales-centos8.sh b/snippets/tpl.220.locales-centos8.sh index 0e36f85..5b66d39 100644 --- a/snippets/tpl.220.locales-centos8.sh +++ b/snippets/tpl.220.locales-centos8.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_locales_centos8() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_locales_centos8[collapsed=true]\r\e[0KInstalling german locales ..." echo echo "${HASH_LINE}" echo "Calling set_locales_centos8() ..." @@ -16,6 +17,7 @@ set_locales_centos8() { echo "[$(date)]: Could not install german locales (langpacks-de)" | tee -a "${ERROR_POINTER}" fi + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_locales_centos8\r\e[0K" } set_locales_centos8 diff --git a/snippets/tpl.225.vimrc-el7.sh b/snippets/tpl.225.vimrc-el7.sh index 4cc15c0..34929b4 100644 --- a/snippets/tpl.225.vimrc-el7.sh +++ b/snippets/tpl.225.vimrc-el7.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_vimrc_el7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_vimrc_el7[collapsed=true]\r\e[0KRewriting /etc/vimrc ..." echo echo "${HASH_LINE}" echo "Calling set_vimrc_el7() ..." @@ -22,6 +23,7 @@ set_vimrc_el7() { fi rm -fv "${tmp_file}" + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_vimrc_el7\r\e[0K" } set_vimrc_el7 diff --git a/snippets/tpl.230.vimrc-centos8.sh b/snippets/tpl.230.vimrc-centos8.sh index 8188b5a..d85c3f7 100644 --- a/snippets/tpl.230.vimrc-centos8.sh +++ b/snippets/tpl.230.vimrc-centos8.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- set_vimrc_centos8() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_set_vimrc_centos8[collapsed=true]\r\e[0KGet yum repository files ..." echo echo "${HASH_LINE}" echo "Calling set_vimrc_centos8() ..." @@ -22,6 +23,7 @@ set_vimrc_centos8() { fi rm -fv "${tmp_file}" + echo -e "\e[0Ksection_end:$( date +%s ):ks_set_vimrc_centos8\r\e[0K" } set_vimrc_centos8 diff --git a/snippets/tpl.240.pkgs-el7.sh b/snippets/tpl.240.pkgs-el7.sh index b1622b6..80129e7 100644 --- a/snippets/tpl.240.pkgs-el7.sh +++ b/snippets/tpl.240.pkgs-el7.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- install_pkgs_el7() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_install_pkgs_el7[collapsed=true]\r\e[0KInstalling additional packages ..." echo echo "${HASH_LINE}" echo "Calling install_pkgs_el7() ..." @@ -28,6 +29,8 @@ install_pkgs_el7() { [color] ui = true EOF + + echo -e "\e[0Ksection_end:$( date +%s ):ks_install_pkgs_el7\r\e[0K" } install_pkgs_el7 diff --git a/snippets/tpl.250.pkgs-centos8.sh b/snippets/tpl.250.pkgs-centos8.sh index 50201c8..a7774d9 100644 --- a/snippets/tpl.250.pkgs-centos8.sh +++ b/snippets/tpl.250.pkgs-centos8.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- install_pkgs_centos8() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_install_pkgs_centos8[collapsed=true]\r\e[0KInstalling additional packages ..." echo echo "${HASH_LINE}" echo "Calling install_pkgs_centos8() ..." @@ -28,6 +29,8 @@ install_pkgs_centos8() { [color] ui = true EOF + + echo -e "\e[0Ksection_end:$( date +%s ):ks_install_pkgs_centos8\r\e[0K" } install_pkgs_centos8 diff --git a/snippets/tpl.270.remove-uek.sh b/snippets/tpl.270.remove-uek.sh index 3d3de66..d976ab6 100644 --- a/snippets/tpl.270.remove-uek.sh +++ b/snippets/tpl.270.remove-uek.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- remove_uek_packages() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_remove_uek_packages[collapsed=true]\r\e[0KRemoving Oracle UEK packages ..." echo echo "${HASH_LINE}" echo "Calling remove_uek_packages() ..." @@ -28,6 +29,7 @@ remove_uek_packages() { echo "Removing UEK packages not necessary." fi + echo -e "\e[0Ksection_end:$( date +%s ):ks_remove_uek_packages\r\e[0K" } remove_uek_packages diff --git a/snippets/tpl.280.dist-upgrade.sh b/snippets/tpl.280.dist-upgrade.sh index ddc4ea2..98840e0 100644 --- a/snippets/tpl.280.dist-upgrade.sh +++ b/snippets/tpl.280.dist-upgrade.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- dist_upgrade() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_dist_upgrade[collapsed=true]\r\e[0KUpgrading all packages ..." echo echo "${HASH_LINE}" echo "Calling dist_upgrade() ..." @@ -17,6 +18,7 @@ dist_upgrade() { echo "[$(date)]: Upgrading system not successful." | tee -a "${ERROR_POINTER}" fi + echo -e "\e[0Ksection_end:$( date +%s ):ks_dist_upgrade\r\e[0K" } dist_upgrade diff --git a/snippets/tpl.300.create-motd.sh b/snippets/tpl.300.create-motd.sh index 0215ae6..e057970 100644 --- a/snippets/tpl.300.create-motd.sh +++ b/snippets/tpl.300.create-motd.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- create_motd() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_create_motd\r\e[0KCreating initial MOTD ..." echo echo "${HASH_LINE}" echo "Calling create_motd() ..." @@ -28,6 +29,7 @@ create_motd() { fi rm -fv "${mk_script}" + echo -e "\e[0Ksection_end:$( date +%s ):ks_create_motd\r\e[0K" } create_motd diff --git a/snippets/tpl.320.root-ssh-login.sh b/snippets/tpl.320.root-ssh-login.sh index 8b95972..ea32524 100644 --- a/snippets/tpl.320.root-ssh-login.sh +++ b/snippets/tpl.320.root-ssh-login.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- disable_root_ssh_login_pw() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_disable_root_ssh_login_pw[collapsed=true]\r\e[0KDisabling SSH access for root with password ..." echo echo "${HASH_LINE}" echo "Calling disable_root_ssh_login_pw() ..." @@ -16,6 +17,7 @@ disable_root_ssh_login_pw() { echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config fi + echo -e "\e[0Ksection_end:$( date +%s ):ks_disable_root_ssh_login_pw\r\e[0K" } disable_root_ssh_login_pw diff --git a/snippets/tpl.350.legato.sh b/snippets/tpl.350.legato.sh index 345f437..6ec5340 100644 --- a/snippets/tpl.350.legato.sh +++ b/snippets/tpl.350.legato.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- install_legato() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_install_legato[collapsed=true]\r\e[0KInstalling Legato networker client ..." echo echo "${HASH_LINE}" echo "Calling install_legato() ..." @@ -31,6 +32,7 @@ install_legato() { mkdir -pv /nsr/res echo "legato01.pixelpark.com" > /nsr/res/servers + echo -e "\e[0Ksection_end:$( date +%s ):ks_install_legato\r\e[0K" } install_legato diff --git a/snippets/tpl.400.chrony.sh b/snippets/tpl.400.chrony.sh index acd7c9f..6709994 100644 --- a/snippets/tpl.400.chrony.sh +++ b/snippets/tpl.400.chrony.sh @@ -53,6 +53,7 @@ install_chrony() { #----------------------------------------------------------- perform_chrony() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_perform_chrony[collapsed=true]\r\e[0KInstalling and configuring Chrony ..." if deinstall_ntp ; then if install_chrony ; then echo @@ -151,6 +152,7 @@ perform_chrony() { done echo >> /etc/chrony.keys + echo -e "\e[0Ksection_end:$( date +%s ):ks_perform_chrony\r\e[0K" } perform_chrony diff --git a/snippets/tpl.450.puppet.sh b/snippets/tpl.450.puppet.sh index 26f4839..8d1da60 100644 --- a/snippets/tpl.450.puppet.sh +++ b/snippets/tpl.450.puppet.sh @@ -4,6 +4,8 @@ #----------------------------------------------------------- install_puppet() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_install_puppet[collapsed=true]\r\e[0KInstalling Puppet agent ..." + local pplabs_conf_dir="/etc/puppetlabs" local puppet_conf_dir="${pplabs_conf_dir}/puppet" local puppet_conf_file="${puppet_conf_dir}/puppet.conf" @@ -97,6 +99,7 @@ install_puppet() { echo "Disabling service puppet ..." systemctl disable puppet + echo -e "\e[0Ksection_end:$( date +%s ):ks_install_puppet\r\e[0K" } install_puppet diff --git a/snippets/tpl.470.postfix.sh b/snippets/tpl.470.postfix.sh index aa830e0..1f7e229 100644 --- a/snippets/tpl.470.postfix.sh +++ b/snippets/tpl.470.postfix.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- install_postfix() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_install_postfix[collapsed=true]\r\e[0KInstalling and configuring Postfix ..." echo echo "${HASH_LINE}" echo "Calling install_postfix() ..." @@ -184,6 +185,7 @@ install_postfix() { postconf -M echo + echo -e "\e[0Ksection_end:$( date +%s ):ks_install_postfix\r\e[0K" } install_postfix diff --git a/snippets/tpl.500.logrotate.sh b/snippets/tpl.500.logrotate.sh index f522c1f..04c9822 100644 --- a/snippets/tpl.500.logrotate.sh +++ b/snippets/tpl.500.logrotate.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- config_logrotate() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_config_logrotate[collapsed=true]\r\e[0KConfiguring logrotation ..." echo echo "${HASH_LINE}" echo "Calling config_logrotate() ..." @@ -48,6 +49,7 @@ config_logrotate() { rm -v "${tmp_file}" echo "Finished logrotate configuration." + echo -e "\e[0Ksection_end:$( date +%s ):ks_config_logrotate\r\e[0K" } config_logrotate