acessando variável de host de inventário no manual ansible

Estou usando o ansible 2.1. Eu tenho o seguinte arquivo host de inventário e uma função sendo chamada por uma peça que precisa de acesso à variável do arquivo host. Quaisquer pensamentos sobre como acessá-lo (atualmente recebendo um erro):

arquivo host

[test1]
test-1 ansible_ssh_host=abc.def.ghi.jkl ansible_ssh_port=1212

[test2]
test2-1 ansible_ssh_host=abc.def.ghi.mno ansible_ssh_port=1212

[test3]
test3-1 ansible_ssh_host=abc.def.ghi.pqr ansible_ssh_port=1212
test3-2 ansible_ssh_host=abc.def.ghi.stu ansible_ssh_port=1212

[all:children]
test1
test2
test3

Função Eu tentei acessar a função nas seguintes modas:

{{ hostvars.ansible_ssh_host }} 

&&

{{ hostvars.test1.ansible_ssh_host }}

Estou tentando acessar o ansible_ssh_host na seção test1.

Erro

fatal: [localhost]: FAILED! => {"failed": true, "msg": "'ansible.vars.hostvars.HostVars object' has no attribute 'ansible'"}

questionAnswers(4)

yourAnswerToTheQuestion