builder.vagrant: simplify communicator.Config field
This commit is contained in:
parent
3fe1c96491
commit
6fbd664b66
@ -27,17 +27,14 @@ type Builder struct {
|
|||||||
runner multistep.Runner
|
runner multistep.Runner
|
||||||
}
|
}
|
||||||
|
|
||||||
type SSHConfig struct {
|
|
||||||
Comm communicator.Config `mapstructure:",squash"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
common.PackerConfig `mapstructure:",squash"`
|
common.PackerConfig `mapstructure:",squash"`
|
||||||
common.HTTPConfig `mapstructure:",squash"`
|
common.HTTPConfig `mapstructure:",squash"`
|
||||||
common.ISOConfig `mapstructure:",squash"`
|
common.ISOConfig `mapstructure:",squash"`
|
||||||
common.FloppyConfig `mapstructure:",squash"`
|
common.FloppyConfig `mapstructure:",squash"`
|
||||||
bootcommand.BootConfig `mapstructure:",squash"`
|
bootcommand.BootConfig `mapstructure:",squash"`
|
||||||
SSHConfig `mapstructure:",squash"`
|
|
||||||
|
Comm communicator.Config `mapstructure:",squash"`
|
||||||
// The directory to create that will contain your output box. We always
|
// The directory to create that will contain your output box. We always
|
||||||
// create this directory and run from inside of it to prevent Vagrant init
|
// create this directory and run from inside of it to prevent Vagrant init
|
||||||
// collisions. If unset, it will be set to packer- plus your buildname.
|
// collisions. If unset, it will be set to packer- plus your buildname.
|
||||||
@ -281,9 +278,9 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
|
|||||||
b.config.GlobalID,
|
b.config.GlobalID,
|
||||||
},
|
},
|
||||||
&communicator.StepConnect{
|
&communicator.StepConnect{
|
||||||
Config: &b.config.SSHConfig.Comm,
|
Config: &b.config.Comm,
|
||||||
Host: CommHost(),
|
Host: CommHost(),
|
||||||
SSHConfig: b.config.SSHConfig.Comm.SSHConfigFunc(),
|
SSHConfig: b.config.Comm.SSHConfigFunc(),
|
||||||
},
|
},
|
||||||
new(common.StepProvision),
|
new(common.StepProvision),
|
||||||
&StepPackage{
|
&StepPackage{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user