fixed wait_for issue

Check if ansible_ssh_host is defined to use if not not use inventory_hostname.