extra_vars and image_name parametrization added

PROD-18791

Change-Id: Ic685ada838833a121b574272fee03796991cbe14
diff --git a/debian-8/template.json b/debian-8/template.json
index bfdea6d..f8b07b2 100644
--- a/debian-8/template.json
+++ b/debian-8/template.json
@@ -2,8 +2,9 @@
    "variables": {
         "user": "root",
         "password": "ho5uo7Uome5d",
-	"do_api_token": "{{ env `DO_API_TOKEN` }}",
-	"distro": "debian-8-x64",
+        "do_api_token": "{{ env `DO_API_TOKEN` }}",
+        "distro": "debian-8-x64",
+        "image_name": "{{ env `IMAGE_NAME` }}",
         "disk_size": "8000"
    },
 
@@ -75,7 +76,7 @@
     {
       "type": "vagrant",
       "keep_input_artifact": true,
-      "output": "images/{{ user `distro` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
+      "output": "images/{{ user `image_name` }}-{{.Provider}}-{{ isotime \"200601021504\" }}.box",
       "except": [ "digitalocean", "docker" ]
     },
     {
@@ -86,7 +87,7 @@
     },
     {
       "type": "docker-save",
-      "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar",
+      "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar",
       "only": ["docker"]
     }
   ],
@@ -164,7 +165,7 @@
       "boot_wait": "5s",
       "disk_size": "{{ user `disk_size`}}",
       "disk_type_id": 4,
-      "vmdk_name": "{{ user `distro`}}",
+      "vmdk_name": "{{ user `image_name`}}",
       "output_directory": "images/{{ user `distro` }}-vmware-{{ isotime \"200601021504\"  }}",
       "guest_os_type": "linux",
       "http_directory": "http",
@@ -187,7 +188,7 @@
       "qemuargs": [
         [ "-m", "1024M" ]
       ],
-      "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\"  }}",
+      "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\"  }}",
       "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\"  }}",
       "format": "qcow2",
       "accelerator": "kvm",
@@ -233,8 +234,8 @@
     {
       "type": "digitalocean",
       "api_token": "{{user `do_api_token`}}",
-      "image": "{{user `distro`}}",
-      "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\"  }}",
+      "image": "{{user `image_name`}}",
+      "snapshot_name": "{{ user `image_name` }}-{{ isotime \"200601021504\"  }}",
       "region" : "ams2",
       "size" : "1gb"
     }