From 78657d339c1848ee15c5cd221a52cff760762f1a Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 11 Jun 2020 12:13:22 +0200 Subject: [PATCH] Debug output --- lib/cr_vmware_tpl/cobbler.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/cr_vmware_tpl/cobbler.py b/lib/cr_vmware_tpl/cobbler.py index 7d0d1d6..cd53411 100644 --- a/lib/cr_vmware_tpl/cobbler.py +++ b/lib/cr_vmware_tpl/cobbler.py @@ -37,7 +37,7 @@ from .config import CrTplConfiguration from .xlate import XLATOR -__version__ = '0.4.6' +__version__ = '0.4.7' LOG = logging.getLogger(__name__) @@ -431,8 +431,10 @@ class Cobbler(BaseHandler): # ------------------------------------------------------------------------- def ensure_profile_ks(self): - remote_ks = self.config.cobbler_profile_ks local_ks = self.base_dir / 'kickstart' / (self.config.cobbler_profile + '.ks') + remote_ks = self.config.cobbler_profile_ks + LOG.info(_("Ensuring currentness of profile kickstart script {!r}.").format( + str(remote_ks))) self.ensure_remote_file(local_ks, remote_ks) @@ -605,6 +607,8 @@ class Cobbler(BaseHandler): local_ks_base = 'template-' + self.config.os_id + '.ks' local_ks = self.base_dir / 'kickstart' / local_ks_base remote_ks = self.config.system_ks + LOG.info(_("Ensuring currentness of system kickstart script {!r}.").format( + str(remote_ks))) self.ensure_remote_file(local_ks, remote_ks) @@ -614,8 +618,13 @@ class Cobbler(BaseHandler): local_snippets_dir = self.base_dir / 'snippets' self.ensure_remote_directory(self.config.snippets_dir) + LOG.info(_("Ensuring currentness of snippets below {!r}.").format( + str(self.config.snippets_dir))) + for local_snippet in local_snippets_dir.glob('*'): remote_snippet = self.config.snippets_dir / local_snippet.name + LOG.debug(_("Ensuring {loc!r} => {rem!r}.").format( + loc=str(local_snippet), rem=str(remote_snippet))) self.ensure_remote_file(local_snippet, remote_snippet, check_parent=False) # ------------------------------------------------------------------------- -- 2.39.5