mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-20 15:51:05 +00:00
make os_keypair return a top level 'id' key
make os_keypair return a top-level 'id' key, much like other os_* resources.
This commit is contained in:
committed by
Matt Clay
parent
bdd73fdfd0
commit
ff090a1224
@@ -146,10 +146,14 @@ def main():
|
||||
" as offered. Delete key first." % name
|
||||
)
|
||||
else:
|
||||
module.exit_json(changed=False, key=keypair)
|
||||
changed = False
|
||||
else:
|
||||
keypair = cloud.create_keypair(name, public_key)
|
||||
changed = True
|
||||
|
||||
new_key = cloud.create_keypair(name, public_key)
|
||||
module.exit_json(changed=True, key=new_key)
|
||||
module.exit_json(changed=changed,
|
||||
key=keypair,
|
||||
id=keypair['id'])
|
||||
|
||||
elif state == 'absent':
|
||||
if keypair:
|
||||
|
||||
Reference in New Issue
Block a user