mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
SSHKeyPath and SSHWaitTimeout have been deprecated in favor of communicator configuration
This commit is contained in:
parent
c88a2ef872
commit
501845cb4f
1 changed files with 0 additions and 13 deletions
|
|
@ -9,21 +9,8 @@ import (
|
|||
|
||||
type SSHConfig struct {
|
||||
Comm communicator.Config `mapstructure:",squash"`
|
||||
|
||||
// These are deprecated, but we keep them around for BC
|
||||
// TODO(@mitchellh): remove
|
||||
SSHKeyPath string `mapstructure:"ssh_key_path"`
|
||||
SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout"`
|
||||
}
|
||||
|
||||
func (c *SSHConfig) Prepare(ctx *interpolate.Context) []error {
|
||||
// TODO: backwards compatibility, write fixer instead
|
||||
if c.SSHKeyPath != "" {
|
||||
c.Comm.SSHPrivateKey = c.SSHKeyPath
|
||||
}
|
||||
if c.SSHWaitTimeout != 0 {
|
||||
c.Comm.SSHTimeout = c.SSHWaitTimeout
|
||||
}
|
||||
|
||||
return c.Comm.Prepare(ctx)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue