From a077c4bc9d67cd6fe8989662cafec1a6f0e9dd3b Mon Sep 17 00:00:00 2001 From: Sam Liu Date: Tue, 8 Mar 2016 15:24:02 +0800 Subject: [PATCH] fix some error for passing CI build. --- .../extras/windows/win_file_version.ps1 | 2 +- .../extras/windows/win_file_version.py | 49 +++++++++++++++++-- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/extras/windows/win_file_version.ps1 b/lib/ansible/modules/extras/windows/win_file_version.ps1 index b9fa39c0dc7..eefa221e88d 100644 --- a/lib/ansible/modules/extras/windows/win_file_version.ps1 +++ b/lib/ansible/modules/extras/windows/win_file_version.ps1 @@ -16,7 +16,7 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . -# WAIT_JSON +# WANT_JSON # POWERSHELL_COMMON $params = Parse-Args $args; diff --git a/lib/ansible/modules/extras/windows/win_file_version.py b/lib/ansible/modules/extras/windows/win_file_version.py index 7688773e6a7..4f23c55053a 100644 --- a/lib/ansible/modules/extras/windows/win_file_version.py +++ b/lib/ansible/modules/extras/windows/win_file_version.py @@ -20,16 +20,17 @@ DOCUMENTATION = ''' --- module: win_file_version -version_added: "2.0" +version_added: "2.1" short_descriptions: Get DLL or EXE file build version description: - Get DLL or EXE file build version - change state alway be false options: - path: - description: - - File to get version(provide absolute path) - + path: + description: + - File to get version(provide absolute path) + required: true + aliases: [] author: Sam Liu ''' @@ -44,3 +45,41 @@ EXAMPLES = ''' - debug: msg="{{exe_file_version}}" ''' + +RETURN = """ +win_file_version.path: + description: file path + returned: always + type: string + +win_file_version.file_version: + description: file version number. + returned: no error + type: string + +win_file_version.product_version: + description: the version of the product this file is distributed with. + returned: no error + type: string + +win_file_version.file_major_part: + description: the major part of the version number. + returned: no error + type: string + +win_file_version.file_minor_part: + description: the minor part of the version number of the file. + returned: no error + type: string + +win_file_version.file_build_part: + description: build number of the file. + returned: no error + type: string + +win_file_version.file_private_part: + description: file private part number. + returned: no error + type: string + +"""