From d1bd5264262201c0928ac237eb59962c6a059802 Mon Sep 17 00:00:00 2001 From: Baptiste Mille-Mathias Date: Sun, 8 Jan 2017 16:33:51 +0100 Subject: [PATCH] Document git module return values (#19485) * Document git module return values * Document git module return values * Remove duplicate and added more variables --- lib/ansible/modules/source_control/git.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/ansible/modules/source_control/git.py b/lib/ansible/modules/source_control/git.py index 21943c2e3e..c94d588a12 100644 --- a/lib/ansible/modules/source_control/git.py +++ b/lib/ansible/modules/source_control/git.py @@ -229,6 +229,29 @@ EXAMPLES = ''' refspec: '+refs/pull/*:refs/heads/*' ''' +RETURN = ''' +after: + description: last commit revision of the repository retrived during the update + returned: success + type: string + sample: 4c020102a9cd6fe908c9a4a326a38f972f63a903 +before: + description: commit revision before the repository was updated, "null" for new repository + returned: success + type: string + sample: 67c04ebe40a003bda0efb34eacfb93b0cafdf628 +remote_url_changed: + description: Contains True or False whether or not the remote URL was changed. + returned: success + type: boolean + sample: True +warnings: + description: List of warnings if requested features were not available due to a too old git version. + returned: error + type: string + sample: Your git version is too old to fully support the depth argument. Falling back to full checkouts. +''' + import os import re import shlex