Hi All,
I’m new to Ansible. started working on Ansible basics.
I installed Ubuntu 14.04 in virtual box and installed Ansible using the following commands
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
from Ansible documentation
Later I updated the hosts file in /etc/ansible to
[webservers]
testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222
and tried to ping using the command
ansible webservers -m ping and I'm getting an error message
testserver | FAILED => SSH Error: ssh: connect to host 127.0.0.1 port 2222: Connection refused while connecting to [127.0.0.1:2222](http://127.0.0.1:2222/)
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
When I googled for connection refused type issues I thought that I should be installing Open SSH server in Ubuntu and did the same using the command
sudo apt-get install openssh-server
Even then I’m getting the same error.
Please let me know if i did some thing wrong or provide any links that i could follow to solve the above issue