Better fix for #7095
This commit is contained in:
parent
82fb7aac5e
commit
d5f88b154f
|
@ -19,13 +19,6 @@ func (s *StepCleanupTempKeys) Run(_ context.Context, state multistep.StateBag) m
|
||||||
// so there's no realistic situation where these keys can cause issues.
|
// so there's no realistic situation where these keys can cause issues.
|
||||||
// However, it's nice to clean up after yourself.
|
// However, it's nice to clean up after yourself.
|
||||||
|
|
||||||
if s.Comm.Type == "none" {
|
|
||||||
return multistep.ActionContinue
|
|
||||||
}
|
|
||||||
|
|
||||||
comm := state.Get("communicator").(packer.Communicator)
|
|
||||||
ui := state.Get("ui").(packer.Ui)
|
|
||||||
|
|
||||||
if !s.Comm.SSHClearAuthorizedKeys {
|
if !s.Comm.SSHClearAuthorizedKeys {
|
||||||
return multistep.ActionContinue
|
return multistep.ActionContinue
|
||||||
}
|
}
|
||||||
|
@ -38,6 +31,9 @@ func (s *StepCleanupTempKeys) Run(_ context.Context, state multistep.StateBag) m
|
||||||
return multistep.ActionContinue
|
return multistep.ActionContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
comm := state.Get("communicator").(packer.Communicator)
|
||||||
|
ui := state.Get("ui").(packer.Ui)
|
||||||
|
|
||||||
cmd := new(packer.RemoteCmd)
|
cmd := new(packer.RemoteCmd)
|
||||||
|
|
||||||
ui.Say("Trying to remove ephemeral keys from authorized_keys files")
|
ui.Say("Trying to remove ephemeral keys from authorized_keys files")
|
||||||
|
|
Loading…
Reference in New Issue