diff --git a/builder/amazon/common/step_key_pair.go b/builder/amazon/common/step_key_pair.go index 0198fceb3..6bb8db532 100644 --- a/builder/amazon/common/step_key_pair.go +++ b/builder/amazon/common/step_key_pair.go @@ -16,7 +16,6 @@ import ( type StepKeyPair struct { Debug bool Comm *communicator.Config - SSHAgentAuth bool DebugKeyPath string TemporaryKeyPairName string @@ -40,12 +39,12 @@ func (s *StepKeyPair) Run(_ context.Context, state multistep.StateBag) multistep return multistep.ActionContinue } - if s.SSHAgentAuth && s.Comm.SSHKeyPair == "" { + if s.Comm.SSHAgentAuth && s.Comm.SSHKeyPair == "" { ui.Say("Using SSH Agent with key pair in Source AMI") return multistep.ActionContinue } - if s.SSHAgentAuth && s.Comm.SSHKeyPair != "" { + if s.Comm.SSHAgentAuth && s.Comm.SSHKeyPair != "" { ui.Say(fmt.Sprintf("Using SSH Agent for existing key pair %s", s.Comm.SSHKeyPair)) state.Put("keyPair", s.Comm.SSHKeyPair) return multistep.ActionContinue diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index eb707654e..af906da75 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -181,7 +181,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepKeyPair{ Debug: b.config.PackerDebug, Comm: &b.config.RunConfig.Comm, - SSHAgentAuth: b.config.Comm.SSHAgentAuth, DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName), TemporaryKeyPairName: b.config.TemporaryKeyPairName, }, diff --git a/builder/amazon/ebssurrogate/builder.go b/builder/amazon/ebssurrogate/builder.go index 03a89603e..10dcf5441 100644 --- a/builder/amazon/ebssurrogate/builder.go +++ b/builder/amazon/ebssurrogate/builder.go @@ -198,7 +198,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepKeyPair{ Debug: b.config.PackerDebug, Comm: &b.config.RunConfig.Comm, - SSHAgentAuth: b.config.Comm.SSHAgentAuth, DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName), TemporaryKeyPairName: b.config.TemporaryKeyPairName, }, diff --git a/builder/amazon/ebsvolume/builder.go b/builder/amazon/ebsvolume/builder.go index 4d3cbd970..8724323c0 100644 --- a/builder/amazon/ebsvolume/builder.go +++ b/builder/amazon/ebsvolume/builder.go @@ -173,7 +173,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepKeyPair{ Debug: b.config.PackerDebug, Comm: &b.config.RunConfig.Comm, - SSHAgentAuth: b.config.Comm.SSHAgentAuth, DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName), TemporaryKeyPairName: b.config.TemporaryKeyPairName, }, diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index 578fab40a..2f8786be7 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -259,7 +259,6 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &awscommon.StepKeyPair{ Debug: b.config.PackerDebug, Comm: &b.config.RunConfig.Comm, - SSHAgentAuth: b.config.Comm.SSHAgentAuth, DebugKeyPath: fmt.Sprintf("ec2_%s.pem", b.config.PackerBuildName), TemporaryKeyPairName: b.config.TemporaryKeyPairName, },