From: Frank Brehm Date: Thu, 15 Aug 2024 12:21:48 +0000 (+0200) Subject: Setting location on fixing hostname X-Git-Tag: 1.11.1^2~2 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=543e8dd86baa17c68762fc170e119cd88a0b4c53;p=pixelpark%2Fcreate-terraform.git Setting location on fixing hostname --- diff --git a/lib/create_terraform/handler/files.py b/lib/create_terraform/handler/files.py index bd20857..d0a54a4 100644 --- a/lib/create_terraform/handler/files.py +++ b/lib/create_terraform/handler/files.py @@ -28,7 +28,7 @@ from ..errors import AbortExecution from ..xlate import XLATOR -__version__ = '0.5.5' +__version__ = '0.5.6' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -778,6 +778,8 @@ class CrTfHandlerFilesMixin(): files.append('init-puppet') files.append('update-all-packages') + zone = "{z}/{c}".format(z=vm.vsphere, c=vm.cluster) + for sname in files: if self.verbose > 1: @@ -842,7 +844,6 @@ class CrTfHandlerFilesMixin(): commands.append("echo '------------------------------'") purpose = self.re_doublequote.sub('\\\"', vm.purpose) - zone = "{z}/{c}".format(z=vm.vsphere, c=vm.cluster) commands.append("chmod -v +x /tmp/create-motd") cmd = ( "/tmp/create-motd --purpose '{p}' --hardware 'vmware (x86_64)' --owner '{o}' " @@ -882,7 +883,7 @@ class CrTfHandlerFilesMixin(): commands.append("echo '------------------------------'") commands.append("chmod -v +x /tmp/fix-etc-hosts") - commands.append("/tmp/fix-etc-hosts --no-ipv6") + commands.append("/tmp/fix-etc-hosts --no-ipv6 --location 'VMWare {}'".format(zone)) content += ' provisioner "remote-exec" {\n' content += ' inline = [\n'