From 54d050c8910225947e3965f1646dd108e3ead719 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 13 Oct 2023 16:39:29 +0200 Subject: [PATCH] Reading settings for rhsm --- lib/cr_tf/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cr_tf/config.py b/lib/cr_tf/config.py index 4c3d059..59df655 100644 --- a/lib/cr_tf/config.py +++ b/lib/cr_tf/config.py @@ -32,7 +32,7 @@ from .vs_config import VsphereConfig from .xlate import XLATOR -__version__ = '1.8.1' +__version__ = '1.8.2' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -478,6 +478,8 @@ class CrTfConfiguration(BaseConfiguration): re_tz = re.compile(r'^\s*(?:tz|time[_-]?zone)\s*$', re.IGNORECASE) re_puppetmaster = re.compile(r'^\s*puppet[_-]?master\s*$', re.IGNORECASE) re_puppetca = re.compile(r'^\s*puppet[_-]?ca\s*$', re.IGNORECASE) + re_rhsm_user = re.compile(r'^\s*rhsm[_-]?user\s*$', re.IGNORECASE) + re_rhsm_password = re.compile(r'^\s*rhsm[_-]?password\s*$', re.IGNORECASE) for (key, value) in config.items(section_name): if key.lower() == 'simulate': @@ -504,6 +506,10 @@ class CrTfConfiguration(BaseConfiguration): f=self.config_file, s=section_name, v=value, n='puppet_ca', e='Invalid Host FQDN for puppetca')) self.puppetca = val.lower() + elif re_rhsm_user.search(key) and value.strip(): + self.rhsm_user = value.strip() + elif re_rhsm_password.search(key) and value.strip(): + self.rhsm_password = value.strip() # ------------------------------------------------------------------------- def eval_config_vsphere(self, config, section_name, vsphere_name): -- 2.39.5