community.windows.win_product_facts – Provides Windows product and license information

From Get docs
Ansible/docs/2.10/collections/community/windows/win product facts module


community.windows.win_product_facts – Provides Windows product and license information

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_product_facts.


Synopsis

  • Provides Windows product and license information.

Examples

- name: Get product id and product key
  community.windows.win_product_facts:

- name: Display Windows edition
  debug:
    var: ansible_os_license_edition

- name: Display Windows license status
  debug:
    var: ansible_os_license_status

Returned Facts

Facts returned by this module are added/updated in the hostvars host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.

Fact Returned Description

ansible_os_license_channel

string / elements=string

always

The Windows license channel.


Sample:

Volume:MAK

ansible_os_license_edition

string / elements=string

always

The Windows license edition.


Sample:

Windows(R) ServerStandard edition

ansible_os_license_status

string / elements=string

always

The Windows license status.


Sample:

Licensed

ansible_os_product_id

string / elements=string

always

The Windows product ID.


Sample:

00326-10000-00000-AA698

ansible_os_product_key

string / elements=string

always

The Windows product key.


Sample:

T49TD-6VFBW-VV7HY-B2PXY-MY47H




Authors

  • Dag Wieers (@dagwieers)

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