# Use host IP as variable in other host

**URL:** <https://forum.ansible.com/t/use-host-ip-as-variable-in-other-host/14150>\
**Category:** Ansible Project\
**Created:** [December 13, 2013, 2:53pm UTC](https://forum.ansible.com/t/use-host-ip-as-variable-in-other-host/14150 "2013-12-13T14:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user44](https://avatars.discourse-cdn.com/v4/letter/u/7ab992/32.png) [@user44](https://forum.ansible.com/u/user44)\
**Post date:** [December 13, 2013, 2:53pm UTC](https://forum.ansible.com/t/use-host-ip-as-variable-in-other-host/14150/1 "2013-12-13T14:53:42Z")

</div>

Hello!

I have two servers. For example, srv1 and srv2.

I need to provide IP address srv1 in the configuration srv2.

How this can be done using the ip address obtained through the facts?

---

<div class="post-metadata">

**Author:** ![Scott\_Sturdivant](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@Scott\_Sturdivant](https://forum.ansible.com/u/Scott_Sturdivant)\
**Post date:** [December 13, 2013, 3:20pm UTC](https://forum.ansible.com/t/use-host-ip-as-variable-in-other-host/14150/2 "2013-12-13T15:20:58Z")

</div>

See the FAQ about accessing information about other hosts: [http://www.ansibleworks.com/docs/playbooks\_variables.html#id22](http://www.ansibleworks.com/docs/playbooks_variables.html#id22)
