using artifact ID

This commit is contained in:
bugbuilder 2017-08-30 18:19:54 -03:00
parent 138f54d9d3
commit f09a9c4653
2 changed files with 1 additions and 6 deletions

View File

@ -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,
},
}

View File

@ -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.