# Why does gather\_facts use the old IP address?

**URL:** <https://forum.ansible.com/t/why-does-gather-facts-use-the-old-ip-address/29724>\
**Category:** Ansible Project\
**Created:** [February 20, 2019, 5:41pm UTC](https://forum.ansible.com/t/why-does-gather-facts-use-the-old-ip-address/29724 "2019-02-20T17:41:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_F](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Robert\_F](https://forum.ansible.com/u/Robert_F)\
**Post date:** [February 20, 2019, 5:41pm UTC](https://forum.ansible.com/t/why-does-gather-facts-use-the-old-ip-address/29724/1 "2019-02-20T17:41:35Z")

</div>

I am using Ansible 2.5.3 to build Debian servers on the [linode.com](http://linode.com) web hosting service. When I provision a server with one Ansible playbook and then try to configure that server with a second Ansible playbook, that second playbook will use an old IP address from a previous run of these provision and configuration playbooks. In other words, if I run both playbooks one time and they run correctly but I destroy that server and re-run both playbooks, I’ll get the error shown below when the second configuration playbook runs it’s Gather Facts task:

> TASK [Gathering Facts] \*\*\*\*  
> fatal: [[my.example.com](http://my.example.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: "SSH Error: data could not be sent to the remote host . Make sure this host can be reached over ssh…

Here is my master playbook ‘site.yml’:

> * * *
> 
> - import\_playbook: provision.yml
> - import\_playbook: configure.yml

provision.yml looks like this:

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [February 20, 2019, 5:58pm UTC](https://forum.ansible.com/t/why-does-gather-facts-use-the-old-ip-address/29724/2 "2019-02-20T17:58:00Z")

</div>

Not Ansible per se, but SSH since it uses the feature Control Persist.

Try meta module[1] reset connection to see if that resolve your problem.

[1] [https://docs.ansible.com/ansible/latest/modules/meta\_module.html](https://docs.ansible.com/ansible/latest/modules/meta_module.html)
