ansible / ansible.builtin / v2.7.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.7.17) — module
pip
Install with pip install ansible==2.7.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: string country: description: ISO 3166-1 alpha-2 country code sample: US type: string hostname: description: Domain name sample: google-public-dns-a.google.com type: string ip: description: Public IP address of a host sample: 8.8.8.8 type: string loc: description: Latitude and Longitude of the location sample: 37.3860,-122.0838 type: string org: description: organization's name sample: AS3356 Level 3 Communications, Inc. type: string postal: description: Postal code sample: '94035' type: string region: description: State or province name sample: California type: string description: Dictionary of ip geolocation facts for a host's IP address returned: changed type: complex