Merge pull request #2339 from larsks/bug/keypair-should-return-id
make os_keypair return a top level 'id' key
This commit is contained in:
commit
3199a73927
1 changed files with 7 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue