From 04d63ea2b8e1a0e092940d15bcb12746ae760522 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 7 Jan 2022 12:09:23 +0100 Subject: [PATCH] Adding Gitlab job log sections --- lib/cr_vmware_tpl/cobbler.py | 4 ++-- snippets/tpl.010.authkeys.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cr_vmware_tpl/cobbler.py b/lib/cr_vmware_tpl/cobbler.py index ec42779..a3b8601 100644 --- a/lib/cr_vmware_tpl/cobbler.py +++ b/lib/cr_vmware_tpl/cobbler.py @@ -794,7 +794,7 @@ class Cobbler(BaseHandler): """Removing the given system.""" LOG.info(_("Removing system {!r} ...").format(name)) - print_section_start('remove_system', "Creating new system ...", collapsed=True) + print_section_start('remove_system', "Removing system ...", collapsed=True) args = ['system', 'remove'] args.append('--name') @@ -813,8 +813,8 @@ class Cobbler(BaseHandler): print_section_end('remove_system') raise ExpectedCobblerError(msg) - print_section_end('remove_system') self.sync() + print_section_end('remove_system') # ------------------------------------------------------------------------- def sync(self): diff --git a/snippets/tpl.010.authkeys.sh b/snippets/tpl.010.authkeys.sh index 3e7ef50..387ce5f 100644 --- a/snippets/tpl.010.authkeys.sh +++ b/snippets/tpl.010.authkeys.sh @@ -4,6 +4,7 @@ #----------------------------------------------------------- create_authkeys() { + echo -e "\e[0Ksection_start:$( date +%s ):ks_create_authkeys[collapsed=true]\r\e[0KCreating authorized_keys of root ..." echo echo "${HASH_LINE}" echo "Calling create_authkeys() ..." @@ -24,6 +25,7 @@ create_authkeys() { cat "${tmp_file}" >> /root/.ssh/authorized_keys fi rm -v "${tmp_file}" + echo -e "\e[0Ksection_end:$( date +%s ):ks_create_authkeys\r\e[0K" } create_authkeys -- 2.39.5