# Ansible cannot find hosts defined in ~/.ssh/config

**URL:** <https://forum.ansible.com/t/ansible-cannot-find-hosts-defined-in-ssh-config/18726>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [July 10, 2015, 9:26am UTC](https://forum.ansible.com/t/ansible-cannot-find-hosts-defined-in-ssh-config/18726 "2015-07-10T09:26:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleksey\_Kislov](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Aleksey\_Kislov](https://forum.ansible.com/u/Aleksey_Kislov)\
**Post date:** [July 10, 2015, 9:26am UTC](https://forum.ansible.com/t/ansible-cannot-find-hosts-defined-in-ssh-config/18726/1 "2015-07-10T09:26:13Z")

</div>

After recent update, when I try to run my playbook, I immediately get the `skipping: no hosts matched `response. I can reproduce it with following command:

```auto
ansible myhost --list-hosts 

```

The output of it is `No hosts matched`. `myhost` is defined in my local ssh config. `-c ssh` has the same effect. When I downgrade to `1.7.2` it works fine (ansible locates `myhost`). `/etc/ansible/ansible.cfg `has defaults in `[ssh_connection]` section.

My system is Ubuntu 15.04. Ssh version is `OpenSSH_6.7p1 Ubuntu-5ubuntu1, OpenSSL 1.0.1f 6 Jan 2014`. Current Ansible version is `1.9.2`.

---

<div class="post-metadata">

**Author:** ![Paul\_Markham](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@Paul\_Markham](https://forum.ansible.com/u/Paul_Markham)\
**Post date:** [July 19, 2015, 4:38am UTC](https://forum.ansible.com/t/ansible-cannot-find-hosts-defined-in-ssh-config/18726/2 "2015-07-19T04:38:02Z")

</div>

I don’t think Ansible is going to look in you .ssh/config for hosts. Instead it’ll look in its inventory, which is probably under /etc/ansible by default. Perhaps upgrading Ansible re-wrote the inventory file and lost you configuration.
