Same error, can you send full playbook details over you are testing?

localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 
'ansible.vars.hostvars.HostVarsVars object' has no attribute 
'ansible_ssh_host_key_ecdsa_public'"}

> On Jan 4, 2019, at 11:47 AM, Hugo Gonzalez <[email protected]> wrote:
> 
> 
>> template:
>> 
>> {% for host in groups['all'] %} 
>> {{ hostvars[host]['ansible_facts']['ssh_host_key_ecdsa_public'] }}  
>> {% endfor %}
>> 
>> 
> This template also works for me, and the keys are different. So you might 
> want to try it:
> 
> {% for host in groups['all'] %}
> {{ hostvars[host]['ansible_ssh_host_key_ecdsa_public'] }}
> {% endfor %}
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/434eb480-74f4-5d68-f97c-fc2c9469b412%40redhat.com
>  
> <https://groups.google.com/d/msgid/ansible-project/434eb480-74f4-5d68-f97c-fc2c9469b412%40redhat.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/42D07B3B-1AFA-4FA4-8708-2BDE4C635750%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to