Merge pull request #2339 from larsks/bug/keypair-should-return-id

make os_keypair return a top level 'id' key
reviewable/pr18780/r1
Brian Coca 9 years ago
commit 3199a73927

@ -146,10 +146,14 @@ def main():
" as offered. Delete key first." % name " as offered. Delete key first." % name
) )
else: else:
module.exit_json(changed=False, key=keypair) changed = False
else:
new_key = cloud.create_keypair(name, public_key) keypair = cloud.create_keypair(name, public_key)
module.exit_json(changed=True, key=new_key) changed = True
module.exit_json(changed=changed,
key=keypair,
id=keypair['id'])
elif state == 'absent': elif state == 'absent':
if keypair: if keypair:

Loading…
Cancel
Save