Discussion:
[ansible-project] Ansible cannot find hosts defined in ~/.ssh/config
Aleksey Kislov
2015-07-10 09:26:13 UTC
Permalink
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:

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.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1067b5a0-f374-4e97-896d-5a0bef77cc2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Paul Markham
2015-07-19 04:38:02 UTC
Permalink
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.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fade8c02-de60-4fe0-8b00-12f12552cda5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...