For e.g, I have these hosts in my inventory:
Since you named the variable name, it is just
{{ name }}