On 1/3/19 4:26 PM, Freddie Eisa wrote:
I had tried but still receive

fatal: [server]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'ssh_host_key_ecdsa_public'"}

Please post the play you're using, or at least the relevant task and template.

This works for me and prints the key.---
- hosts: all

  tasks:
    - debug:
        msg: "{% for host in groups['all'] %} {{ hostvars[host]['ansible_facts']['ssh_host_key_ecdsa_public'] }} {% endfor %}"


--

Hugo F. gonzalez

Senior Consultant

Red Hat LATAM <https://www.redhat.com>

<https://red.ht/sig>

--
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/51fe343a-0562-0849-9161-4a0d04366503%40redhat.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to