mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-24 10:21:20 -05:00
18 lines
389 B
Go
18 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
|
|
}
|