inventory_hostname / ansible_host

(I’m sure this is simple, but I can’t find it.)

I have a host in my /etc/ansbile/hosts file:

packard ansible_host=vmoc-packard

I have a play that looks like this:

local_action: “blah blah blah {{user}}@{{inventory_hostname}} blah blah blah”

When I do this, the inventory_hostname is “packard” … but what I want/need it to use is “vmoc-packard”

is there a variable that does this for me? I can’t find it in the ansible facts.

Thanks.

–EbH

Yes, and it's right in front of you, the variable i ansible_host.