# It looks to me as though 127.0.0.1 unreachable!

**URL:** <https://forum.ansible.com/t/it-looks-to-me-as-though-127-0-0-1-unreachable/21827>\
**Category:** Ansible Developer\
**Created:** [June 22, 2016, 8:56am UTC](https://forum.ansible.com/t/it-looks-to-me-as-though-127-0-0-1-unreachable/21827 "2016-06-22T08:56:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graham\_Goldstein](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@Graham\_Goldstein](https://forum.ansible.com/u/Graham_Goldstein)\
**Post date:** [June 22, 2016, 8:56am UTC](https://forum.ansible.com/t/it-looks-to-me-as-though-127-0-0-1-unreachable/21827/1 "2016-06-22T08:56:36Z")

</div>

I’ve written quite a few Ansible roles now and feel like I have a good grasp of what’s going on, but recently I’ve come across a strange response to my attempt to run a local shell command. Here’s my complete {{ role }}/tasks/main.yaml:

`

---

<div class="post-metadata">

**Author:** ![Graham\_Goldstein](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@Graham\_Goldstein](https://forum.ansible.com/u/Graham_Goldstein)\
**Post date:** [June 22, 2016, 2:50pm UTC](https://forum.ansible.com/t/it-looks-to-me-as-though-127-0-0-1-unreachable/21827/2 "2016-06-22T14:50:59Z")

</div>

It seems replacing 127.0.0.1 with localhost resolves the issue.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [June 22, 2016, 3:13pm UTC](https://forum.ansible.com/t/it-looks-to-me-as-though-127-0-0-1-unreachable/21827/3 "2016-06-22T15:13:33Z")

</div>

​do you have a host in your inventory defined as 127.0.0.1? this would override the ‘implicit’ localhost which sets ansible\_connection=local.​
