# playbook - Could not resolve hostname ~/ssh.conf:

**URL:** <https://forum.ansible.com/t/playbook-could-not-resolve-hostname-ssh-conf/23187>\
**Category:** Ansible Project\
**Created:** [December 6, 2016, 6:07pm UTC](https://forum.ansible.com/t/playbook-could-not-resolve-hostname-ssh-conf/23187 "2016-12-06T18:07:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swathi\_Cutie](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Swathi\_Cutie](https://forum.ansible.com/u/Swathi_Cutie)\
**Post date:** [December 6, 2016, 6:07pm UTC](https://forum.ansible.com/t/playbook-could-not-resolve-hostname-ssh-conf/23187/1 "2016-12-06T18:07:12Z")

</div>

Please help ,

Ansible playbook failing with the error "failed connect to host via ssh’

[root@localhost infrastructure]# ansible-playbook -i /home/swathi/Desktop/infrastructure/production/ python\_request.yml

PLAY [mesos-agents] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [[tppbibig05.ticketsplus.com](http://tppbibig05.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig02.ticketsplus.com](http://tppbibig02.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig01.ticketsplus.com](http://tppbibig01.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig04.ticketsplus.com](http://tppbibig04.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig03.ticketsplus.com](http://tppbibig03.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig09.ticketsplus.com](http://tppbibig09.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig07.ticketsplus.com](http://tppbibig07.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig06.ticketsplus.com](http://tppbibig06.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}  
fatal: [[tppbibig08.ticketsplus.com](http://tppbibig08.ticketsplus.com)]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: Could not resolve hostname ~/ssh.conf: Name or service not known\r\n”, “unreachable”: true}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[tppbibig01.ticketsplus.com](http://tppbibig01.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig02.ticketsplus.com](http://tppbibig02.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig03.ticketsplus.com](http://tppbibig03.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig04.ticketsplus.com](http://tppbibig04.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig05.ticketsplus.com](http://tppbibig05.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig06.ticketsplus.com](http://tppbibig06.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig07.ticketsplus.com](http://tppbibig07.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig08.ticketsplus.com](http://tppbibig08.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0  
[tppbibig09.ticketsplus.com](http://tppbibig09.ticketsplus.com) : ok=0 changed=0 unreachable=1 failed=0

ansible 2.2.0.0  
config file = /home/swathi/Desktop/infrastructure/ansible.cfg  
configured module search path = Default w/o overrides

playbook = python\_request.yml

---

<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:** [February 10, 2017, 2:53am UTC](https://forum.ansible.com/t/playbook-could-not-resolve-hostname-ssh-conf/23187/2 "2017-02-10T02:53:40Z")

</div>

It seems like the the connection host is set to ~/ssh.conf, do you  
have it in the inventory?
