[lxd] allow passing of publish properties
This commit is contained in:
parent
f3c64ce81a
commit
c1a7b3845a
|
@ -12,10 +12,11 @@ import (
|
|||
|
||||
type Config struct {
|
||||
common.PackerConfig `mapstructure:",squash"`
|
||||
OutputImage string `mapstructure:"output_image"`
|
||||
ContainerName string `mapstructure:"container_name"`
|
||||
CommandWrapper string `mapstructure:"command_wrapper"`
|
||||
Image string `mapstructure:"image"`
|
||||
OutputImage string `mapstructure:"output_image"`
|
||||
ContainerName string `mapstructure:"container_name"`
|
||||
CommandWrapper string `mapstructure:"command_wrapper"`
|
||||
Image string `mapstructure:"image"`
|
||||
PublishProperties map[string]string `mapstructure:"publish_properties"`
|
||||
InitTimeout time.Duration
|
||||
|
||||
ctx interpolate.Context
|
||||
|
|
|
@ -32,6 +32,10 @@ func (s *stepPublish) Run(state multistep.StateBag) multistep.StepAction {
|
|||
"publish", name, "--alias", config.OutputImage,
|
||||
}
|
||||
|
||||
for k, v := range config.PublishProperties {
|
||||
publish_args = append(publish_args, fmt.Sprintf("%s=%s", k, v))
|
||||
}
|
||||
|
||||
ui.Say("Publishing container...")
|
||||
stdoutString, err := LXDCommand(publish_args...)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue