mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
cs_sshkeypair: fix ssh key rename (#36726)
* tests: cs_sshkeypair: add reproducer for failed key rename * cs_sshkeypair: fix rename ssh key
This commit is contained in:
parent
487ff1fe9b
commit
cdb2969703
2 changed files with 68 additions and 22 deletions
|
@ -169,7 +169,7 @@ class AnsibleCloudStackSshKey(AnsibleCloudStack):
|
|||
# We need to make another lookup if there is a key with identical name.
|
||||
self.ssh_key = None
|
||||
ssh_key = self.get_ssh_key()
|
||||
if ssh_key['fingerprint'] != fingerprint:
|
||||
if ssh_key and ssh_key['fingerprint'] != fingerprint:
|
||||
args['name'] = name
|
||||
self.query_api('deleteSSHKeyPair', **args)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue