# Gathering facts acquires less facts than the setup module

**URL:** <https://forum.ansible.com/t/gathering-facts-acquires-less-facts-than-the-setup-module/28480>\
**Category:** Ansible Project\
**Created:** [August 31, 2018, 10:12am UTC](https://forum.ansible.com/t/gathering-facts-acquires-less-facts-than-the-setup-module/28480 "2018-08-31T10:12:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkempster22uu](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mkempster22uu](https://forum.ansible.com/u/mkempster22uu)\
**Post date:** [August 31, 2018, 10:12am UTC](https://forum.ansible.com/t/gathering-facts-acquires-less-facts-than-the-setup-module/28480/1 "2018-08-31T10:12:04Z")

</div>

Does anyone know if there is a distinct difference between running the setup module on a host and the automatic gathering facts module?  
The documents say that they are both the same thing but when I look at the facts that the gathering step found it has a large amount of facts missing that the setup module by itself can find.

For example, I am using ansible\_processor\_cores. I can find this on all of our Solaris hosts using the setup module

[root@hostname ~]# ansible -m setup remote\_host | grep ansible\_processor\_cores  
“ansible\_processor\_cores”: 16,

Yet when running a playbook I either get variable undefined, or if I have a lower precedent variable (vars file etc.) it will go back to that value.

Weirdly the playbook can find that fact on Solaris LDOMs but not control domains, despite it being available to the setup module on both. Am I missing something or is the gathering facts tasks not doing what is supposed to?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 31, 2018, 3:41pm UTC](https://forum.ansible.com/t/gathering-facts-acquires-less-facts-than-the-setup-module/28480/2 "2018-08-31T15:41:40Z")

</div>

Some facts create conflicts, so they don't get injected as 'top level  
variables', look inside the `ansible_facts` variable for 'all facts'.  
When using it from 'adhoc' you are looking at the raw output of the  
plugin vs what is registered at the top level inside ansible, that is  
probably why you see a discrepancy.

You can even disable 'top level fact vars'  
[https://docs.ansible.com/ansible/2.5/reference\_appendices/config.html](https://docs.ansible.com/ansible/2.5/reference_appendices/config.html)  
which would make them all disappear as variables, but they are always  
available under the `ansible_facts` variable.
