From: Frank Brehm Date: Fri, 17 Nov 2023 16:51:45 +0000 (+0100) Subject: Making kiskstart meta RHEL9_REPOSERVER_URL depending, whether the current distro... X-Git-Tag: 3.2.1~5^2~7 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=8184c9d7f77385d57720062c64fc36d9f228e533;p=pixelpark%2Fcreate-vmware-tpl.git Making kiskstart meta RHEL9_REPOSERVER_URL depending, whether the current distro is RHEL --- diff --git a/lib/cr_vmware_tpl/cobbler/profile.py b/lib/cr_vmware_tpl/cobbler/profile.py index cfc2809..b742c77 100644 --- a/lib/cr_vmware_tpl/cobbler/profile.py +++ b/lib/cr_vmware_tpl/cobbler/profile.py @@ -27,7 +27,7 @@ from .. import print_section_start, print_section_end from ..errors import ExpectedCobblerError from ..xlate import XLATOR -__version__ = '0.2.0' +__version__ = '0.2.1' LOG = logging.getLogger(__name__) @@ -257,7 +257,8 @@ class CobblerProfile(): ks_meta_list.append("SYSTEM_STATUS={}".format(status)) ks_meta_list.append("WS_REL_FILESDIR={}".format(self.cfg.cobbler_ws_rel_filesdir)) ks_meta_list.append("COBBLER_URL=http://{}".format(self.cfg.cobbler_host)) - ks_meta_list.append("RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url) + if self.current_distro.is_rhel: + ks_meta_list.append("RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url) ks_meta = ' '.join(ks_meta_list) @@ -304,10 +305,11 @@ class CobblerProfile(): LOG.debug(_('Profile ks_meta {!r} is not ok.').format('COBBLER_URL')) ks_meta_ok = False - if 'RHEL9_REPOSERVER_URL' not in ks_meta_vars or \ - ks_meta_vars['RHEL9_REPOSERVER_URL'] != self.cfg.rhel9_repo_server_url: - LOG.debug(_('Profile ks_meta {!r} is not ok.').format('RHEL9_REPOSERVER_URL')) - ks_meta_ok = False + if self.current_distro.is_rhel: + if 'RHEL9_REPOSERVER_URL' not in ks_meta_vars or \ + ks_meta_vars['RHEL9_REPOSERVER_URL'] != self.cfg.rhel9_repo_server_url: + LOG.debug(_('Profile ks_meta {!r} is not ok.').format('RHEL9_REPOSERVER_URL')) + ks_meta_ok = False return ks_meta_ok @@ -331,7 +333,8 @@ class CobblerProfile(): ks_meta_list.append("SYSTEM_STATUS={}".format(status)) ks_meta_list.append("WS_REL_FILESDIR={}".format(self.cfg.cobbler_ws_rel_filesdir)) ks_meta_list.append("COBBLER_URL=http://{}".format(self.cfg.cobbler_host)) - ks_meta_list.append("RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url) + if self.current_distro.is_rhel: + ks_meta_list.append("RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url) ks_meta = None if ks_meta_list: