mirror of
https://github.com/hashicorp/packer.git
synced 2026-04-26 00:31:18 -04:00
Merge pull request #1410 from msabramo/openstack_builder_blank_keypair_is_error
builder/openstack: error out when gets blank keypair
This commit is contained in:
commit
668bd51fa2
1 changed files with 4 additions and 0 deletions
|
|
@ -29,6 +29,10 @@ func (s *StepKeyPair) Run(state multistep.StateBag) multistep.StepAction {
|
|||
state.Put("error", fmt.Errorf("Error creating temporary keypair: %s", err))
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
if keyResp.PrivateKey == "" {
|
||||
state.Put("error", fmt.Errorf("The temporary keypair returned was blank"))
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
|
||||
// If we're in debug mode, output the private key to the working
|
||||
// directory.
|
||||
|
|
|
|||
Loading…
Reference in a new issue