So it depends on the host and how they are named and was really a test case.
The one I’m really concerned about is this one now
{% for host in groups['servers_production'] %}
{{ hostvars[host]['ssh_host_key_ecdsa_public'] }}
{% endfor %}
> On Jan 3, 2019, at 2:31 PM, Hugo Gonzalez <[email protected]> wrote:
>
> Hello Freddie,
>
>
> On 1/3/19 12:04 PM, Freddie Eisa wrote:
>> {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no
>> attribute 'eth0'"}
>>
>>
> How do you know what to look for in ansible_facts? Run the setup module
> against your managed hosts and see what the facts look like.
>
> I have this on a node of mine:
>
> "ansible_facts": {
> ...,
>
> "ansible_default_ipv4": {
> "address": "XXXX",
> "alias": "eth0",
> "broadcast": "XXXX",
> "gateway": "XXXX",
> "interface": "eth0",
> "macaddress": "XXXXX",
> "mtu": 1500,
> "netmask": "255.255.248.0",
> "network": "XXXXXXX",
> "type": "ether"
> },
> }
>
>
> I don't see any hostvars[host]['ansible_facts']['eth0']['ipv4']['address']
>
> Try $ ansible <hostgroup> -m setup and examine the output to see how you
> should look for eth0's IP address.
>
>
>
> Cheers,
>
>
>
> Hugo
>
>
>
>
>
>
>
>
>
> --
> 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]
> <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/4473f03c-a4f0-f89c-5d92-77b2cf85ba01%40redhat.com
>
> <https://groups.google.com/d/msgid/ansible-project/4473f03c-a4f0-f89c-5d92-77b2cf85ba01%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/9A28E9E8-3649-4294-AA53-C3795A1A1A7B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.