extra_vars and image_name parametrization added
PROD-18791
Change-Id: Ic685ada838833a121b574272fee03796991cbe14
diff --git a/ubuntu-14.04/template.json b/ubuntu-14.04/template.json
index 13d878c..b91fa95 100644
--- a/ubuntu-14.04/template.json
+++ b/ubuntu-14.04/template.json
@@ -4,6 +4,7 @@
"password": "ho5uo7Uome5d",
"do_api_token": "{{ env `DO_API_TOKEN` }}",
"distro": "ubuntu-14-04-x64",
+ "image_name": "{{ env `IMAGE_NAME` }}",
"disk_size": "8000"
},
"provisioners": [
@@ -74,7 +75,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"
@@ -90,7 +91,7 @@
},
{
"type": "docker-save",
- "path": "images/{{ user `distro` }}-docker-{{ isotime \"200601021504\" }}.tar",
+ "path": "images/{{ user `image_name` }}-docker-{{ isotime \"200601021504\" }}.tar",
"only": [
"docker"
]
@@ -203,7 +204,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",
@@ -229,7 +230,7 @@
"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",
@@ -279,8 +280,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"
}