]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Reading settings for rhsm
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 13 Oct 2023 14:39:29 +0000 (16:39 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 13 Oct 2023 14:39:29 +0000 (16:39 +0200)
lib/cr_tf/config.py

index 4c3d05917cc56df064106a62c5a7892d98ede294..59df6554e979abb35e8796c22e5ef75b445229fc 100644 (file)
@@ -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):