]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Ensuring rsyslog config file templates
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 17 Mar 2021 10:50:01 +0000 (11:50 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 17 Mar 2021 10:50:01 +0000 (11:50 +0100)
lib/cr_vmware_tpl/cobbler.py
lib/cr_vmware_tpl/handler.py

index b1bba839c72cb8b5730d21c911ff8bb74596a1c8..100c1d16e817bec676a1d319ed485debe3143458 100644 (file)
@@ -40,7 +40,7 @@ from .config import CrTplConfiguration
 
 from .xlate import XLATOR
 
-__version__ = '0.6.3'
+__version__ = '0.6.4'
 
 LOG = logging.getLogger(__name__)
 
@@ -430,6 +430,19 @@ class Cobbler(BaseHandler):
 
         self.ensure_remote_file(local_file, remote_file)
 
+    # -------------------------------------------------------------------------
+    def ensure_rsyslog_cfg_files(self):
+
+        remote_dir = docroot / self.config.system_status
+
+        LOG.info(_("Ensuring correctness of rsyslog config files ..."))
+
+        for local_cfg_file in self.base_dir.glob('*rsyslog.conf*'):
+            remote_cfg_file = remote_dir / local_cfg_file.name
+            LOG.debug(_("Ensuring {loc!r} => {rem!r}.").format(
+                loc=str(local_cfg_file), rem=str(remote_cfg_file)))
+            self.ensure_remote_file(local_cfg_file, remote_cfg_file, check_parent=False)
+
     # -------------------------------------------------------------------------
     def ensure_profile_ks(self):
 
index ecc1fcec46e3247b4f899cdf64732e4684a1be9e..03b6c05ba3a6adbe6475a5dbdb46807bae6a0d7e 100644 (file)
@@ -44,7 +44,7 @@ from .cobbler import Cobbler
 
 from .xlate import XLATOR
 
-__version__ = '1.8.3'
+__version__ = '1.8.4'
 
 LOG = logging.getLogger(__name__)
 TZ = pytz.timezone('Europe/Berlin')
@@ -257,6 +257,7 @@ class CrTplHandler(BaseHandler):
         self.check_for_cobbler_distro()
         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()