packer-cn/builder/vmware/common/tools_config.go

19 lines
389 B
Go

package common
import (
"github.com/hashicorp/packer/template/interpolate"
)
type ToolsConfig struct {
ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"`
ToolsUploadPath string `mapstructure:"tools_upload_path"`
}
func (c *ToolsConfig) Prepare(ctx *interpolate.Context) []error {
if c.ToolsUploadPath == "" {
c.ToolsUploadPath = "{{ .Flavor }}.iso"
}
return nil
}