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