This is a very simple Ansible playbook I run from AWX to get information about hosts, and it works as intended on Linux machines:
---
- name: Get some info
debug:
msg: "{{ ansible_hostname }} {{ ansible_default_ipv4.address }} {{ ansible_distribution }}"
However, when run over Windows machines, it returns this error:
fatal: [MYWINHOST1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible_default_ipv4' is undefined\n\nThe error appears to be in '/tmp/bwrap_21138_4q41r57e/awx_21138_is8pox6p/project/roles/windows/tasks/getsomeinfo.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Get some info\n ^ here\n"}
How do I access and print the same Ansible facts values from a Windows machine?