From 3cd81d2dd37a119f775fc34c2a1d479eda06ee47 Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Mon, 29 Jun 2015 15:55:15 -0400 Subject: [PATCH] Use newest documentation style for return value. --- .../modules/cloud/openstack/os_keypair.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_keypair.py b/lib/ansible/modules/cloud/openstack/os_keypair.py index f485d7fd2fc..7a0c1ca47a0 100644 --- a/lib/ansible/modules/cloud/openstack/os_keypair.py +++ b/lib/ansible/modules/cloud/openstack/os_keypair.py @@ -33,10 +33,6 @@ extends_documentation_fragment: openstack version_added: "2.0" description: - Add or Remove key pair from OpenStack -notes: - - The module returns a dictionary describing the keypair, with - keys including: id, name, public_key. A private_key entry may - also be included if a keypair was generated for you. options: name: description: @@ -78,6 +74,26 @@ EXAMPLES = ''' name: ansible_key ''' +RETURN = ''' +id: + description: Unique UUID. + returned: success + type: string +name: + description: Name given to the keypair. + returned: success + type: string +public_key: + description: The public key value for the keypair. + returned: success + type: string +private_key: + description: The private key value for the keypair. + returned: Only when a keypair is generated for the user (e.g., when creating one + and a public key is not specified). + type: string +''' + def _system_state_change(module, keypair): state = module.params['state']