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

1,308 views
Skip to first unread message

Swathi Cutie

unread,
Dec 6, 2016, 1:07:12 PM12/6/16
to Ansible Project
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]: 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]: 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]: 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]: 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]: 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]: 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]: 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]: 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]: 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 : ok=0    changed=0    unreachable=1    failed=0   
tppbibig02.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
tppbibig03.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
tppbibig04.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
tppbibig05.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
tppbibig06.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
tppbibig07.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
tppbibig08.ticketsplus.com : ok=0    changed=0    unreachable=1    failed=0   
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
---
- hosts: mesos-agents
  become_user: root
  become: yes
# Install python package requests on mesos agents
  tasks:
  - name: install request packages
    yum:
       name: python-requests
       state: present
~                         

Brian Coca

unread,
Feb 9, 2017, 9:53:52 PM2/9/17
to Ansible Project
It seems like the the connection host is set to ~/ssh.conf, do you
have it in the inventory?


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages