mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user