From 13fa74627e76cb91f4e124d8b9616f42ead32ec4 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 6 Sep 2021 17:07:50 +0200 Subject: [PATCH] Extendig debug output. --- lib/cr_tf/app.py | 18 ++++++++---------- lib/cr_tf/handler.py | 3 +++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/cr_tf/app.py b/lib/cr_tf/app.py index a8fb6d4..f1eea53 100644 --- a/lib/cr_tf/app.py +++ b/lib/cr_tf/app.py @@ -312,16 +312,14 @@ class CrTfApplication(BaseApplication): self.config.pdns_api_key = self.get_secret( prompt=prompt, item_name=self.colored(_('PowerDNS API key'), 'AQUA')) - if not self.config.vm_root_password: - # Using faked root password, because it is currently not used. - # TODO: When the root password is used, then substitute fake password - # by prompting for the real root password. - LOG.debug(_( - "Using faked root password {!r} - " - "but this is currently not used.").format(self.fake_root_passwd)) - self.config.vm_root_password = self.fake_root_passwd -# self.config.vm_root_password = self.get_secret( -# prompt=_('root password for generated VMs'), item_name=_('root password')) +# if not self.config.vm_root_password: +# # Using faked root password, because it is currently not used. +# # TODO: When the root password is used, then substitute fake password +# # by prompting for the real root password. +# LOG.debug(_( +# "Using faked root password {!r} - " +# "but this is currently not used.").format(self.fake_root_passwd)) +# self.config.vm_root_password = self.fake_root_passwd self.handler = CreateTerraformHandler( appname=self.appname, verbose=self.verbose, base_dir=self.base_dir, diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index cfbb245..948ef07 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -269,6 +269,9 @@ class CreateTerraformHandler(BaseHandler): if config: self.config = config + if self.verbose >= 1: + msg = _("Giveen configurations:") + '\n' + pp(self.config) + LOG.debug(msg) self.script_dir = self.base_dir.joinpath('postinstall-scripts') LOG.debug(_("Directory for postinstall scripts: {!r}.").format(str(self.script_dir))) -- 2.39.5