So I'm trying to get the IP address of every server via `ansible` and 
expect to use something like

ansible -i inventory host_group -m setup -a 
filter="ansible_eth0.ipv4.address" returns no results. It returns something 
like

server38.prod.foo | success >> {
    "ansible_facts": {}, 
    "changed": false
}


But I can do ansible -i inventory host_group -m setup -a 
filter="ansible_eth0" and it will return:

server38.prod.foo | success >> {
    "ansible_facts": {
        "ansible_eth0": {
            "active": true, 
            "device": "eth0", 
            "ipv4": {
                "address": "1.2.3.4.", 
                "netmask": "255.255.255.0", 
                "network": "1.2.3.0"
            }, 
            "ipv6": [
                {
                    "address": "fe11::225:90ff:fe11:1111", 
                    "prefix": "64", 
                    "scope": "link"
                }
            ], 
            "macaddress": "00:11:11:11:11:11", 
            "module": "e1000e", 
            "mtu": 1500, 
            "promisc": false, 
            "type": "ether"
        }
    }, 
    "changed": false
}


So it does return facts...how do I get filter further to return just the IP 
address? 

-- 
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/a1f4a60c-f153-402e-b746-9b1e25c90c88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to