# Gathering facts - missing hosts.

**URL:** <https://forum.ansible.com/t/gathering-facts-missing-hosts/13248>\
**Category:** Ansible Project\
**Created:** [August 2, 2013, 4:31pm UTC](https://forum.ansible.com/t/gathering-facts-missing-hosts/13248 "2013-08-02T16:31:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Praczko](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Marcin\_Praczko](https://forum.ansible.com/u/Marcin_Praczko)\
**Post date:** [August 2, 2013, 4:31pm UTC](https://forum.ansible.com/t/gathering-facts-missing-hosts/13248/1 "2013-08-02T16:31:27Z")

</div>

Hi,

I started working with ansible and must admin that most times is working quite well. But resently I have issue which warried me in terms of gathering facts from hosts:

Details:  
ansible 1.2.2  
SysOP: CentOS 6.2 64b

Goal:

- Create basic TXT files with details from each hosts
- Files should write in /root/ansible\_facts.txt-hostname

Expected:

- Have 8 result files with details about servers

Issue:

- From 8 hosts only 4 details are writting (always the same hosts)

Playbook: gather\_facts.yml  
—\> START

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 2, 2013, 8:51pm UTC](https://forum.ansible.com/t/gathering-facts-missing-hosts/13248/2 "2013-08-02T20:51:23Z")

</div>

Can I see your inventory file?

---

<div class="post-metadata">

**Author:** ![Marcin\_Praczko](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Marcin\_Praczko](https://forum.ansible.com/u/Marcin_Praczko)\
**Post date:** [August 3, 2013, 12:20pm UTC](https://forum.ansible.com/t/gathering-facts-missing-hosts/13248/3 "2013-08-03T12:20:45Z")

</div>

Hi,

This is inventory file:  
—\> START  
[vm-dev]  
192.168.77.20 ansible\_ssh\_user=vagrant ansible\_ssh\_pass=vagrant

[ter1]  
srv1  
srv2

[ter2]  
srv3  
srv4

[ter3]  
srv5  
srv6

[ter4]  
srv7  
srv8

[ter-all:children]  
ter1  
ter2  
ter3  
ter4  
—\> END

I’ve also noticed that fin host 192.168.77.20 as vagrant user (in vagrant VM) there is a file created: {{g\_ansible\_facts\_file}}-{{inventory\_hostname}} - with 8 records which much 8 hosts in inventory.  
But records are exectly command with ansible\_facts (see previous email printf). So content have strings: {{ ansible\_hostname}} , etc - not valies from ansible facter.

Hope that helps.  
I look forward to hearing from you.

Best regards,  
Marcin Praczko

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 3, 2013, 3:56pm UTC](https://forum.ansible.com/t/gathering-facts-missing-hosts/13248/4 "2013-08-03T15:56:33Z")

</div>

You are referencing a group named “srv-all” that is not in the inventory file above. I suspect you are doing something a bit differently and are using a different inventory file.

---

<div class="post-metadata">

**Author:** ![Marcin\_Praczko](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Marcin\_Praczko](https://forum.ansible.com/u/Marcin_Praczko)\
**Post date:** [August 6, 2013, 7:42pm UTC](https://forum.ansible.com/t/gathering-facts-missing-hosts/13248/5 "2013-08-06T19:42:01Z")

</div>

Hi,

Thanks for point this, inventory file should have line: [srv-all:children] instead of [ter-all:children].  
In my inventory srv1…srv8 are real hostnames from production servers which I don’t want copy here. So I rewrote inventory file and results by using terr1…terr2 and srv1…srv8.  
So my last email with inventory had typo.

If this details are not sufficient, I can create some github code for vagrant which will allow repeat steps.

Please let me know your thougths.

Best regards,  
Marcin Praczko
