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

19 lines
389 B
Go
Raw Normal View History

package common
import (
2017-04-04 16:39:01 -04:00
"github.com/hashicorp/packer/template/interpolate"
)
type ToolsConfig struct {
2014-05-10 00:12:14 -04:00
ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"`
ToolsUploadPath string `mapstructure:"tools_upload_path"`
}
2015-05-27 17:16:28 -04:00
func (c *ToolsConfig) Prepare(ctx *interpolate.Context) []error {
if c.ToolsUploadPath == "" {
c.ToolsUploadPath = "{{ .Flavor }}.iso"
}
2015-05-27 17:16:28 -04:00
return nil
}