]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Changing generation of MOTD
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 11 Jan 2022 13:26:56 +0000 (14:26 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 11 Jan 2022 13:26:56 +0000 (14:26 +0100)
lib/cr_tf/handler.py

index 6a5f6abe391483e8f75b1f7e74331285e48ef376..5950b8f0c45b018a1ac21455b7ac2035ccb6a367 100644 (file)
@@ -2737,11 +2737,14 @@ class CreateTerraformHandler(BaseHandler):
 
         purpose = self.re_doublequote.sub('\\\"', vm.purpose)
 
+        zone = "{z}/{c}".format(z=vm.vsphere, c=vm.cluster)
+
         commands.append("chmod +x /tmp/create-motd")
         cmd = ("/tmp/create-motd --purpose '{p}' --hardware 'vmware (x86_64)' --owner '{o}' "
-                "--zone 'VMWare' --customer '{c}'  --email '{m}' --tier '{t}' "
-                "--environment '{e}' --role '{r}'").format( p=purpose, t=vm.puppet_tier, o=vm.customer,
-                c=vm.puppet_customer, m=vm.puppet_contact, e=vm.puppet_env, r=vm.puppet_role)
+                "--location 'VMWare' --zone '{z}' --customer '{c}'  --email '{m}' --tier '{t}' "
+                "--environment '{e}' --role '{r}'").format( p=purpose, t=vm.puppet_tier,
+                o=vm.customer, z=zone, c=vm.puppet_customer, m=vm.puppet_contact,
+                e=vm.puppet_env, r=vm.puppet_role)
         if vm.puppet_project:
             cmd += " --project '{pr}'".format(pr=vm.puppet_project)
         cmd += " | tee /etc/motd"