SyntaxFix
Write A Post
Hire A Developer
Questions
You should be able to use the variable name directly
ansible_ssh_host
Or you can go through hostvars without having to specify the host literally by using the magic variable inventory_hostname
inventory_hostname
hostvars[inventory_hostname].ansible_ssh_host