# wrong task state with network\_cli (failed/unreachable)

**URL:** <https://forum.ansible.com/t/wrong-task-state-with-network-cli-failed-unreachable/33824>\
**Category:** Ansible Project\
**Created:** [September 16, 2020, 10:10am UTC](https://forum.ansible.com/t/wrong-task-state-with-network-cli-failed-unreachable/33824 "2020-09-16T10:10:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg\_Monroe](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@Greg\_Monroe](https://forum.ansible.com/u/Greg_Monroe)\
**Post date:** [September 16, 2020, 10:10am UTC](https://forum.ansible.com/t/wrong-task-state-with-network-cli-failed-unreachable/33824/1 "2020-09-16T10:10:39Z")

</div>

Hello! I’m evaluating ansible to configure network switches and observed that the task result is not correct if the switch is not reachable. Using network\_cli it’s always ‘failed’ where I’d expect 'unreachable". A minimal working example using localhost:

host.yml:

all:  
hosts:  
local:  
ansible\_host: 127.0.0.1

playbook.yml:

---

<div class="post-metadata">

**Author:** ![Richard\_Wolford](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@Richard\_Wolford](https://forum.ansible.com/u/Richard_Wolford)\
**Post date:** [September 16, 2020, 10:30pm UTC](https://forum.ansible.com/t/wrong-task-state-with-network-cli-failed-unreachable/33824/2 "2020-09-16T22:30:43Z")

</div>

I believe you can’t use the loopback address as the destination. Have you tried the private IP?
