I had the same error. After reading the "ssh.py", I've seen it occured when there is no address associated with the host when ansible list host with inventory.
Ansible uses your inventory script with the argument "--host ubuntu2" and if there is something like that :
I had the same error. After reading the "ssh.py", I've seen it occured when there is no address associated with the host when ansible list host with inventory.
Ansible uses your inventory script with the argument "--host ubuntu2" and if there is something like that :
"{ ssh_host" : null, ssh_port" : "22", ssh_user" : "username", ssh_private_ key_file" : "~/.ssh/id_rsa"
"ansible_
"ansible_
"ansible_
"ansible_
}"
you can see "ansible_ssh_host" is null.
Hope it helps...