# unreachable stats from module

**URL:** <https://forum.ansible.com/t/unreachable-stats-from-module/18131>\
**Category:** Ansible Developer\
**Created:** [April 29, 2015, 8:00pm UTC](https://forum.ansible.com/t/unreachable-stats-from-module/18131 "2015-04-29T20:00:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxime.gerges31](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@maxime.gerges31](https://forum.ansible.com/u/maxime.gerges31)\
**Post date:** [April 29, 2015, 8:00pm UTC](https://forum.ansible.com/t/unreachable-stats-from-module/18131/1 "2015-04-29T20:00:12Z")

</div>

Hello,

I’m currently developing a module used to connect to network devices using Exscript and Ansible as local connection.  
I’d like to know if ansible module is able to tell the playbook stats if the remote device is unreachable rather that failed.

When using the local connection, it is currently impossible to have device unreachable state (as we run the module on the local machine).  
When the ansible module fails for some reason, it automatically set the fail state without option to set unreachable to my knowledge.

Does anyone has any insight regarding this “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:** [May 1, 2015, 7:15pm UTC](https://forum.ansible.com/t/unreachable-stats-from-module/18131/2 "2015-05-01T19:15:46Z")

</div>

Only connection plugins can determine if a machine is unreachable,  
which you bypass by using the local one and having the module do the  
networking itself. But you can pass information in the msg= on module  
failure as to what caused the failure and let the user know 'device  
was unreachable'.
