From f09a9c46535ab2eb78f59c02a0df37dbc4caad9e Mon Sep 17 00:00:00 2001 From: bugbuilder Date: Wed, 30 Aug 2017 18:19:54 -0300 Subject: [PATCH] using artifact ID --- post-processor/vsphere-template/post-processor.go | 4 +--- website/source/docs/post-processors/vsphere-template.html.md | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/post-processor/vsphere-template/post-processor.go b/post-processor/vsphere-template/post-processor.go index d7afa712e..09ec5c49c 100644 --- a/post-processor/vsphere-template/post-processor.go +++ b/post-processor/vsphere-template/post-processor.go @@ -26,7 +26,6 @@ type Config struct { Username string `mapstructure:"username"` Password string `mapstructure:"password"` Datacenter string `mapstructure:"datacenter"` - VMName string `mapstructure:"vm_name"` Folder string `mapstructure:"folder"` ctx interpolate.Context @@ -55,7 +54,6 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { "host": &p.config.Host, "username": &p.config.Username, "password": &p.config.Password, - "vm_name": &p.config.VMName, } for key, ptr := range vc { @@ -120,7 +118,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac Folder: p.config.Folder, }, &stepMarkAsTemplate{ - VMName: p.config.VMName, + VMName: artifact.Id(), Source: source, }, } diff --git a/website/source/docs/post-processors/vsphere-template.html.md b/website/source/docs/post-processors/vsphere-template.html.md index 8dae682e5..e72dc19cc 100644 --- a/website/source/docs/post-processors/vsphere-template.html.md +++ b/website/source/docs/post-processors/vsphere-template.html.md @@ -25,7 +25,6 @@ An example is shown below, showing only the post-processor configuration: "insecure": true, "username": "root", "password": "secret", - "vm_name": "distro-7.3", "datacenter": "mydatacenter", "folder": "/packer-templates/os/distro-7" } @@ -45,8 +44,6 @@ Required: - `username` (string) - The username to use to authenticate to the vSphere endpoint. -- `vm_name` (string) - The name of the VM once it is uploaded. - Optional: - `datacenter` (string) - If you have more than one, you will need to specify which one the ESXi used.