From f4e34d5c3ac2ba9592ad53586c6f65629cf6ce28 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Thu, 28 Jul 2016 17:44:04 -0400 Subject: [PATCH] Add RETURN docs for github_key (#2634) --- source_control/github_key.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source_control/github_key.py b/source_control/github_key.py index 3b887b85372..fb5f8f86562 100644 --- a/source_control/github_key.py +++ b/source_control/github_key.py @@ -52,6 +52,22 @@ options: author: Robert Estelle (@erydo) ''' +RETURN = ''' +deleted_keys: + description: Keys that were deleted, if any. + returned: When state=absent + type: list + +matching_keys: + description: Keys that match the specified name. + returned: When state=present + type: list + +key: + description: The key created. + returned: When state=present and a new key is created. +''' + EXAMPLES = ''' - name: Read SSH public key to authorize shell: cat /home/foo/.ssh/id_rsa.pub @@ -154,7 +170,8 @@ def ensure_key_absent(session, name, check_mode): to_delete = [key for key in get_all_keys(session) if key['title'] == name] delete_keys(session, to_delete, check_mode=check_mode) - return {'changed': bool(to_delete), 'deleted_keys': to_delete} + return {'changed': bool(to_delete), + 'deleted_keys': to_delete} def ensure_key_present(session, name, pubkey, force, check_mode):