From 11155a272ad5c39fd8d7efd945dd145f78d60809 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 23 Jun 2022 14:50:53 +0200 Subject: [PATCH] Start generating kickstart file --- lib/cr_vmware_tpl/cobbler.py | 3 ++- lib/cr_vmware_tpl/config.py | 7 ++++--- lib/cr_vmware_tpl/handler.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/cr_vmware_tpl/cobbler.py b/lib/cr_vmware_tpl/cobbler.py index 8e63cae..7f9294e 100644 --- a/lib/cr_vmware_tpl/cobbler.py +++ b/lib/cr_vmware_tpl/cobbler.py @@ -42,7 +42,7 @@ from .config import CrTplConfiguration from .xlate import XLATOR -__version__ = '0.8.2' +__version__ = '0.8.3' LOG = logging.getLogger(__name__) @@ -679,6 +679,7 @@ class Cobbler(BaseHandler): remote_ks = self.cfg.system_ks LOG.info(_("Ensuring currentness of system kickstart script {!r}.").format( str(remote_ks))) + return print_section_start( 'ensure_system_ks', 'Ensuring currentness of system kickstart script', collapsed=True) diff --git a/lib/cr_vmware_tpl/config.py b/lib/cr_vmware_tpl/config.py index 9fb0a23..8a308f6 100644 --- a/lib/cr_vmware_tpl/config.py +++ b/lib/cr_vmware_tpl/config.py @@ -31,7 +31,7 @@ from . import DEFAULT_CONFIG_DIR, DEFAULT_DISTRO_ARCH from .xlate import XLATOR -__version__ = '1.9.2' +__version__ = '1.9.3' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -344,7 +344,6 @@ class CrTplConfiguration(BaseMultiConfig): default_cobbler_ssh_timeout = 30 default_cobbler_distro = 'CentOS-8.2-x86_64' default_cobbler_rootdir = Path('/var/lib/cobbler') - default_cobbler_profile = 'vmware-template-' + default_os_id default_cobbler_profile_repos = ['pp-centos8-baseos'] default_cobbler_nameservers = [ '93.188.109.11', @@ -380,6 +379,8 @@ class CrTplConfiguration(BaseMultiConfig): valid_system_status = ('development', 'testing', 'acceptance', 'production') default_system_status = 'development' + default_cobbler_profile = 'vmware-template-' + default_os_id + '-' + default_system_status + default_swap_size_mb = 512 # ------------------------------------------------------------------------- @@ -629,7 +630,7 @@ class CrTplConfiguration(BaseMultiConfig): self.template_name = self.os_id + '-template' if not self.cobbler_profile_given: - self.cobbler_profile = 'vmware-template-' + self.os_id + self.cobbler_profile = 'vmware-template-' + self.os_id + '-' + self.system_status self.verify_cobbler_distros() diff --git a/lib/cr_vmware_tpl/handler.py b/lib/cr_vmware_tpl/handler.py index 7948442..90143f7 100644 --- a/lib/cr_vmware_tpl/handler.py +++ b/lib/cr_vmware_tpl/handler.py @@ -49,7 +49,7 @@ from .cobbler import Cobbler from .xlate import XLATOR -__version__ = '2.1.1' +__version__ = '2.1.2' LOG = logging.getLogger(__name__) TZ = pytz.timezone('Europe/Berlin') @@ -266,11 +266,11 @@ class CrTplHandler(BaseHandler): LOG.debug(_("Starting handling ...")) self.cobbler.get_cobbler_version() self.check_for_cobbler_distro() + self.cobbler.ensure_system_ks() return 0 self.cobbler.ensure_profile() self.cobbler.ensure_root_authkeys() self.cobbler.ensure_rsyslog_cfg_files() - self.cobbler.ensure_system_ks() self.cobbler.ensure_snippets() self.cobbler.ensure_keys() self.cobbler.ensure_repo_files() -- 2.39.5