]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Checking for existence of directory of postinstall scripts. 1.3.3
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 25 Sep 2019 14:02:44 +0000 (16:02 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 25 Sep 2019 14:02:44 +0000 (16:02 +0200)
etc/create-terraform.ini.default
lib/cr_tf/__init__.py
lib/cr_tf/app.py
lib/cr_tf/handler.py

index 6bf4f38c23b355788876a62b35ae7abdb64164ca..755c7e93eb209217d54fbfdd9a8d8dd3b339d16d 100644 (file)
@@ -12,7 +12,7 @@
 ;time_zone = Europe/Berlin
 
 ; Puppetmaster - wird bei 'terraform destroy' verwendet
-;puppet_master = puppetmaster01.pixelpark.com
+;puppet_master = puppetmaster04.pixelpark.com
 
 ; Puppetca-Host wird für die Registrierung neu installierter Maschinen bei Puppet
 ; während 'terraform apply' verwendet
index 59064570f548cf73975ad409b0c85da1fda11963..3c038de7b9ec5b24f238bd79aee504ecddb90dd4 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/env python3
 # -*- coding: utf-8 -*-
 
-__version__ = '1.3.2'
+__version__ = '1.3.3'
 
 MIN_VERSION_TERRAFORM = '0.12.0'
 MAX_VERSION_TERRAFORM = '0.12.99'
index eccc00f19acaf1d2bf9081584680e6bc59f867c1..2425e17f59c03f7a1fa12f0c4ceddd73066a50fe 100644 (file)
@@ -221,7 +221,7 @@ class CrTfApplication(BaseApplication):
             cfg_file_rel = os.path.relpath(str(self.cfg_file), str(cur_dir))
             default_cfg_file_rel = os.path.relpath(str(default_conf_file), str(cur_dir))
             msg = (_(
-                "Configuration file {f!r} does not exists. Please copy {d!r} to {f!r} and "
+                "Configuration file {f!r} does not exists.\nPlease copy {d!r} to {f!r} and "
                 "fill out all necessary entries, e.g. the passwords and API keys.").format(
                     f=cfg_file_rel, d=default_cfg_file_rel))
             LOG.error(msg)
index 11bdd3ff024416c77791c5e203aa2e89f04afa7c..e378993d4abc2f123a2eb184b748e290efe77561 100644 (file)
@@ -59,7 +59,7 @@ from .terraform.disk import TerraformDisk
 
 from .xlate import XLATOR
 
-__version__ = '2.8.8'
+__version__ = '2.8.9'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -216,6 +216,15 @@ class CreateTerraformHandler(BaseHandler):
             self.config = config
 
         self.script_dir = self.base_dir.joinpath('postinstall-scripts')
+        LOG.debug(_("Directory for postinstall scripts: {!r}").format(str(self.script_dir)))
+        if not self.script_dir.exists():
+            msg = _("Directory for postinstall scripts {!r} does not exists.").format(
+                str(self.script_dir))
+            raise ExpectedHandlerError(msg)
+        if not self.script_dir.is_dir():
+            msg = _("Path {!r} for postinstall scripts exists, but is not a directory.").format(
+                str(self.script_dir))
+            raise ExpectedHandlerError(msg)
 
         if initialized:
             self.initialized = True