From 4c7db6c657e5d33f31d9d26f84882295c4bf3429 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 23 Jan 2023 18:50:25 +0100 Subject: [PATCH] Minor changes on generating and ensuring authorized keys for root --- lib/cr_vmware_tpl/cobbler.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/cr_vmware_tpl/cobbler.py b/lib/cr_vmware_tpl/cobbler.py index 38c64c4..89dbc1b 100644 --- a/lib/cr_vmware_tpl/cobbler.py +++ b/lib/cr_vmware_tpl/cobbler.py @@ -45,7 +45,7 @@ from .config import CrTplConfiguration from .xlate import XLATOR -__version__ = '0.9.2' +__version__ = '0.9.3' LOG = logging.getLogger(__name__) @@ -233,11 +233,10 @@ class Cobbler(BaseHandler): h=self.host, p=self.ssh_port, u=self.ssh_user)) if self.simulate: - if self.verbose > 1: - LOG.debug(_( - "Simulating SCP of {local!r} to {user}@{host}:{remote} ...").format( - local=str(local_file), user=self.ssh_user, - host=self.host, remote=str(remote_file))) + LOG.debug(_( + "Simulating SCP of {local!r} to {user}@{host}:{remote} ...").format( + local=str(local_file), user=self.ssh_user, + host=self.host, remote=str(remote_file))) else: ssh.connect( @@ -246,10 +245,9 @@ class Cobbler(BaseHandler): sftp = ssh.open_sftp() - if self.verbose > 1: - LOG.debug(_("SCP of {local!r} to {user}@{host}:{remote} ...").format( - local=str(local_file), user=self.ssh_user, - host=self.host, remote=str(remote_file))) + LOG.debug(_("SCP of {local!r} to {user}@{host}:{remote} ...").format( + local=str(local_file), user=self.ssh_user, + host=self.host, remote=str(remote_file))) sftp.put(str(local_file), str(remote_file)) -- 2.39.5