from .xlate import XLATOR
-__version__ = '0.9.1'
+__version__ = '0.9.2'
LOG = logging.getLogger(__name__)
if check_parent:
self.check_remote_directory(remote_file.parent)
- if self.verbose > 1:
- msg = _("Checking remote file {rfile!r} based on local {lfile!r} ...").format(
- rfile=str(remote_file), lfile=str(local_file))
- LOG.debug(msg)
+ msg = _("Checking remote file {rfile!r} based on local {lfile!r} ...").format(
+ rfile=str(remote_file), lfile=str(local_file))
+ LOG.debug(msg)
if not local_file.exists() or not local_file.is_file():
msg = _("Local file {!r} either not exists or is not a regular file.").format(
from .xlate import XLATOR
-__version__ = '2.3.1'
+__version__ = '2.3.2'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
self.create_root_authkeys()
self.cobbler.ensure_profile()
self.cobbler.ensure_webroot()
- self.cobbler.ensure_root_authkeys(self.auth_keys_file)
+ # self.cobbler.ensure_root_authkeys(self.auth_keys_file)
self.cobbler.ensure_rsyslog_cfg_files()
self.cobbler.ensure_snippets()
LOG.info(_("Creating authorized keys of root from LDAP ..."))
+ print_section_start(
+ 'create_root_authkeys', "Generating authorized_keys of root.", collapsed=True)
prefix = 'tmp.authorized_keys.root.'
(fh, tmp_keys_file) = tempfile.mkstemp(prefix=prefix, text=True)
self.auth_keys_file = Path(tmp_keys_file)
auth_keys += used_key + '\n'
auth_keys += line
- if self.verbose > 2:
- msg = _("Generated authorized keys for root:") + '\n' + auth_keys
- LOG.debug(msg)
+ msg = _("Generated authorized keys for root:") + '\n' + auth_keys
+ LOG.debug(msg)
finally:
self.disconnect_ldap()
self.auth_keys_file.write_text(auth_keys)
+ print_section_end('create_root_authkeys')
# -------------------------------------------------------------------------
def get_ldap_admins(self):
msg = _("Trying to get a list of all DPX admins with their public SSH keys ...")
LOG.debug(msg)
- if self.verbose > 1:
- msg = _("LDAP search starting in {!r} with filter:").format(ldap_config.base_dn)
- msg += '\n' + fltr
- LOG.debug(msg)
+ msg = _("LDAP search starting in {!r} with filter:").format(ldap_config.base_dn)
+ msg += '\n' + fltr
+ LOG.debug(msg)
status, result, response, request = self.ldap.search(
search_base=ldap_config.base_dn, search_scope=ldap3.SUBTREE, search_filter=fltr,