Ansible - Get Facts from Remote Windows Hosts
<p>I am using Ansible / Ansible Tower and would like to determine what facts are available on my Windows host. The <a href="http://docs.ansible.com/ansible/playbooks_variables.html#information-discovered-from-systems-facts" rel="nofollow">documentation</a> states that I can run the following:</p>

<pre><code>ansible hostname -m setup
</code></pre>

<p>How would I incorporate this into a playbook I run from Tower so I can gather the information from hosts?</p>

<p>Here is the current Playbook per the assistance given:</p>

<pre><code># This play outputs the facts of the Windows targets in scope

- name: Gather Windows Facts 
  hosts: "{{ target }}"
  gather_facts: yes
  tasks:
  - setup:
    register: ansible_facts
  - debug: item
    with_dict: ansible_facts
</code></pre>

<p>However, running this produces the following error:</p>

<blockquote>
  <p>ERROR! this task 'debug' has extra params, which is only allowed in
  the following modules: command, shell, script, include, include_vars,
  add_host, group_by, set_fact, raw, meta</p>
</blockquote>