|
|
|
|
@ -57,8 +57,7 @@ type RunConfig struct {
|
|
|
|
|
WindowsPasswordTimeout time.Duration `mapstructure:"windows_password_timeout"`
|
|
|
|
|
|
|
|
|
|
// Communicator settings
|
|
|
|
|
Comm communicator.Config `mapstructure:",squash"`
|
|
|
|
|
SSHInterface string `mapstructure:"ssh_interface"`
|
|
|
|
|
Comm communicator.Config `mapstructure:",squash"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|
|
|
|
@ -84,12 +83,12 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|
|
|
|
errs := c.Comm.Prepare(ctx)
|
|
|
|
|
|
|
|
|
|
// Validating ssh_interface
|
|
|
|
|
if c.SSHInterface != "public_ip" &&
|
|
|
|
|
c.SSHInterface != "private_ip" &&
|
|
|
|
|
c.SSHInterface != "public_dns" &&
|
|
|
|
|
c.SSHInterface != "private_dns" &&
|
|
|
|
|
c.SSHInterface != "" {
|
|
|
|
|
errs = append(errs, fmt.Errorf("Unknown interface type: %s", c.SSHInterface))
|
|
|
|
|
if c.Comm.SSHInterface != "public_ip" &&
|
|
|
|
|
c.Comm.SSHInterface != "private_ip" &&
|
|
|
|
|
c.Comm.SSHInterface != "public_dns" &&
|
|
|
|
|
c.Comm.SSHInterface != "private_dns" &&
|
|
|
|
|
c.Comm.SSHInterface != "" {
|
|
|
|
|
errs = append(errs, fmt.Errorf("Unknown interface type: %s", c.Comm.SSHInterface))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if c.Comm.SSHKeyPairName != "" {
|
|
|
|
|
|