Documentation
¶
Overview ¶
Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
Index ¶
- func ConvertToLinuxPath(winAbsPath string) (string, error)
- func Decode(config *Config, raws ...interface{}) error
- func Run(ctx context.Context, ui packer.Ui, config *Config) (bool, error)
- func Validate(config *Config) error
- type Communicator
- func (c *Communicator) Download(string, io.Writer) error
- func (c *Communicator) DownloadDir(string, string, []string) error
- func (c *Communicator) Start(ctx context.Context, cmd *packer.RemoteCmd) error
- func (c *Communicator) Upload(string, io.Reader, *os.FileInfo) error
- func (c *Communicator) UploadDir(string, string, []string) error
- type Config
- type EnvVarsTemplate
- type ExecuteCommandTemplate
- type FlatConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToLinuxPath ¶
C:/path/to/your/file becomes /mnt/c/path/to/your/file
Types ¶
type Communicator ¶
type Communicator struct {
ExecuteCommand []string
}
func (*Communicator) DownloadDir ¶
func (c *Communicator) DownloadDir(string, string, []string) error
type Config ¶
type Config struct {
common.PackerConfig `mapstructure:",squash"`
// ** DEPRECATED: USE INLINE INSTEAD **
// ** Only Present for backwards compatibility **
// Command is the command to execute
Command string
// An inline script to execute. Multiple strings are all executed
// in the context of a single shell.
Inline []string
// The shebang value used when running inline scripts.
InlineShebang string `mapstructure:"inline_shebang"`
// An array of multiple Runtime OSs to run on.
OnlyOn []string `mapstructure:"only_on"`
// The file extension to use for the file generated from the inline commands
TempfileExtension string `mapstructure:"tempfile_extension"`
// The local path of the shell script to upload and execute.
Script string
// An array of multiple scripts to run.
Scripts []string
// An array of environment variables that will be injected before
// your command(s) are executed.
Vars []string `mapstructure:"environment_vars"`
EnvVarFormat string `mapstructure:"env_var_format"`
// The command used to execute the script. The '{{ .Path }}' variable
// should be used to specify where the script goes, {{ .Vars }}
// can be used to inject the environment_vars into the environment.
ExecuteCommand []string `mapstructure:"execute_command"`
UseLinuxPathing bool `mapstructure:"use_linux_pathing"`
// contains filtered or unexported fields
}
func (*Config) FlatMapstructure ¶ added in v1.4.5
func (*Config) FlatMapstructure() interface{}
FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type EnvVarsTemplate ¶
type EnvVarsTemplate struct {
WinRMPassword string
}
type ExecuteCommandTemplate ¶
type FlatConfig ¶ added in v1.4.5
type FlatConfig struct {
PackerBuildName *string `mapstructure:"packer_build_name" cty:"packer_build_name"`
PackerBuilderType *string `mapstructure:"packer_builder_type" cty:"packer_builder_type"`
PackerDebug *bool `mapstructure:"packer_debug" cty:"packer_debug"`
PackerForce *bool `mapstructure:"packer_force" cty:"packer_force"`
PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error"`
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables"`
PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables"`
Command *string `cty:"command"`
Inline []string `cty:"inline"`
InlineShebang *string `mapstructure:"inline_shebang" cty:"inline_shebang"`
OnlyOn []string `mapstructure:"only_on" cty:"only_on"`
TempfileExtension *string `mapstructure:"tempfile_extension" cty:"tempfile_extension"`
Script *string `cty:"script"`
Scripts []string `cty:"scripts"`
Vars []string `mapstructure:"environment_vars" cty:"environment_vars"`
EnvVarFormat *string `mapstructure:"env_var_format" cty:"env_var_format"`
ExecuteCommand []string `mapstructure:"execute_command" cty:"execute_command"`
UseLinuxPathing *bool `mapstructure:"use_linux_pathing" cty:"use_linux_pathing"`
}
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
Click to show internal directories.
Click to hide internal directories.