community.windows.win_file_version – Get DLL or EXE file build version

From Get docs
Ansible/docs/2.11/collections/community/windows/win file version module


community.windows.win_file_version – Get DLL or EXE file build version

Note

This plugin is part of the community.windows collection (version 1.2.0).

To install it use: ansible-galaxy collection install community.windows.

To use it in a playbook, specify: community.windows.win_file_version.


Synopsis

  • Get DLL or EXE file build version.

Parameters

Parameter Choices/Defaults Comments

path

path / required

File to get version.

Always provide absolute path.



Notes

Note

  • This module will always return no change.


See Also

See also

ansible.windows.win_file
The official documentation on the ansible.windows.win_file module.


Examples

- name: Get acm instance version
  community.windows.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

file_build_part

string

no error

build number of the file.


file_major_part

string

no error

the major part of the version number.


file_minor_part

string

no error

the minor part of the version number of the file.


file_private_part

string

no error

file private part number.


file_version

string

no error

File version number..


path

string

always

file path


product_version

string

no error

The version of the product this file is distributed with.





Authors

  • Sam Liu (@SamLiu79)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/windows/win_file_version_module.html