Each Ansible module's documentation page has an "Attributes" section.
For example, here is the one for the command module. It has these attributes: check_mode, diff_mode, platform and raw.
In general, how do I use a module's attributes?
And in this particular example, what is the platform attribute and how do I use it?
These are documentation only. They describe some of the capabilities and properties of the module.
They mean only that the module which was developed has implemented the capabilities to use
check_modeordiff_mode. In other words, they state only ifcheck_modeordiff_mode"are supported" by the module and if you can take advantage of Using check mode or Using diff mode.No, as it states only for which target platform the module was developed. An attribure
platform: posixmeans you can't use the module on Windows.Some background information can be found within the Developer Guide of the Ansible documentation.
For such Use Case it is recommended to use Ansible facts and Conditionals based on
ansible_facts, specificallyos_family.Some References
for Windows targets ...
ansible_os_family... when Windows ..."ansible_os_familycondition ..."