community.windows.win_product_facts – Provides Windows product and license information¶
This plugin is part of the community.windows collection.
To install it use:
ansible-galaxy collection install community.windows.
To use it in a playbook, specify:
- 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
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.