# Anisble - host file

**URL:** <https://forum.ansible.com/t/anisble-host-file/21725>\
**Category:** Ansible Project\
**Created:** [June 9, 2016, 3:48pm UTC](https://forum.ansible.com/t/anisble-host-file/21725 "2016-06-09T15:48:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulh](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@Paulh](https://forum.ansible.com/u/Paulh)\
**Post date:** [June 9, 2016, 3:48pm UTC](https://forum.ansible.com/t/anisble-host-file/21725/1 "2016-06-09T15:48:06Z")

</div>

Hello,

Can the vars\_file be passed into the hosts file using the -include: statment?

eg:  
**vars\_file.yml**  
DBserver\_1\_FDQN: [host1.us.com](http://host1.us.com)  
DBserver\_1\_IP: 10.15.87.220  
DBserver\_2\_FDQN: [host2.us.com](http://host2.us.com)  
DBserver\_2\_IP: 10.15.87.221

**hosts.yml**

- include: vars\_file  
[servers]  
DBnode  
HeartBeatNode

[DBnode]  
{{ DBserver\_1\_IP }}  
{{ DBserver\_2\_IP }}

---

<div class="post-metadata">

**Author:** ![Mark\_Janssen](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mark\_Janssen](https://forum.ansible.com/u/Mark_Janssen)\
**Post date:** [June 10, 2016, 2:25pm UTC](https://forum.ansible.com/t/anisble-host-file/21725/2 "2016-06-10T14:25:19Z")

</div>

I don’t think so… just put your vars in group\_vars/all or group\_vars/
