# Ansible 2.2 ios modules are failing with message "Failed to connect to the host via ssh."

**URL:** <https://forum.ansible.com/t/ansible-2-2-ios-modules-are-failing-with-message-failed-to-connect-to-the-host-via-ssh/21548>\
**Category:** Ansible Project\
**Created:** [May 24, 2016, 5:19pm UTC](https://forum.ansible.com/t/ansible-2-2-ios-modules-are-failing-with-message-failed-to-connect-to-the-host-via-ssh/21548 "2016-05-24T17:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davis\_mathew\_kuriako](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@davis\_mathew\_kuriako](https://forum.ansible.com/u/davis_mathew_kuriako)\
**Post date:** [May 24, 2016, 5:19pm UTC](https://forum.ansible.com/t/ansible-2-2-ios-modules-are-failing-with-message-failed-to-connect-to-the-host-via-ssh/21548/1 "2016-05-24T17:19:06Z")

</div>

I’m not able to run ios\_command module in Ansible 2.1 for executing commands on my cisco routers.

I’ve written a playbook for testing ios\_command module on cisco routers.

Following is the playbook I wrote

`

---

<div class="post-metadata">

**Author:** ![psprygada](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@psprygada](https://forum.ansible.com/u/psprygada)\
**Post date:** [May 25, 2016, 3:22pm UTC](https://forum.ansible.com/t/ansible-2-2-ios-modules-are-failing-with-message-failed-to-connect-to-the-host-via-ssh/21548/2 "2016-05-25T15:22:09Z")

</div>

Add connection: local to your playbook
