win_file_version - Get DLL or EXE file build version

New in version 2.1.

Synopsis

  • Get DLL or EXE file build version
  • change state alway be false

Parameters

Parameter Choices/Defaults Comments
path
required
File to get version(provide absolute path)

Examples

- name: Get acm instance version
  win_file_version:
    path: C:\Windows\System32\cmd.exe
  register: exe_file_version

- debug:
    msg: '{{ exe_file_version }}'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
win_file_version.file_build_part
string
no error
build number of the file.

win_file_version.file_major_part
string
no error
the major part of the version number.

win_file_version.file_minor_part
string
no error
the minor part of the version number of the file.

win_file_version.file_private_part
string
no error
file private part number.

win_file_version.file_version
string
no error
file version number.

win_file_version.path
string
always
file path

win_file_version.product_version
string
no error
the version of the product this file is distributed with.



Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Author

  • Sam Liu

Hint

If you notice any issues in this documentation you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.5/modules/win_file_version_module.html