ansible / ansible.builtin / v2.9.17 / module / ipinfoio_facts Retrieve IP geolocation facts of a host's IP address | "added in version" 2.3 of ansible.builtin" Authors: Aleksei Kostiuk (@akostyuk) preview | supported by communityansible.builtin.ipinfoio_facts (v2.9.17) — module
pip
Install with pip install ansible==2.9.17
Gather IP geolocation facts of a host's IP address using ipinfo.io API
# Retrieve geolocation data of a host's IP address - name: get IP geolocation data ipinfoio_facts:
timeout: default: 10 description: - HTTP connection timeout in seconds required: false http_agent: default: ansible-ipinfoio-module/0.0.1 description: - Set http user agent required: false
ansible_facts: contains: city: description: City name sample: Mountain View type: str country: description: ISO 3166-1 alpha-2 country code sample: US type: str hostname: description: Domain name sample: google-public-dns-a.google.com type: str ip: description: Public IP address of a host sample: 8.8.8.8 type: str loc: description: Latitude and Longitude of the location sample: 37.3860,-122.0838 type: str org: description: organization's name sample: AS3356 Level 3 Communications, Inc. type: str postal: description: Postal code sample: '94035' type: str region: description: State or province name sample: California type: str description: Dictionary of ip geolocation facts for a host's IP address returned: changed type: complex