win_file_version - Get DLL or EXE file build version

New in version 2.1.

Synopsis

  • Get DLL or EXE file build version.

Parameters

Parameter Choices/Defaults Comments
path
required
File to get version.
Always provide absolute path.

Notes

Note

  • This module will always return no change.

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.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • Sam Liu (@SamLiu79)

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.6/modules/win_file_version_module.html