From: Frank Brehm Date: Tue, 11 Jan 2022 13:26:56 +0000 (+0100) Subject: Changing generation of MOTD X-Git-Tag: 1.5.15^2~5 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ec10ed3d58b27bb69503d22b66852745f4e10f1b;p=pixelpark%2Fcreate-terraform.git Changing generation of MOTD --- diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 6a5f6ab..5950b8f 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -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"