community / community.general / 0.2.1 / module / ipinfoio_facts Retrieve IP geolocation facts of a host's IP address Authors: Aleksei Kostiuk (@akostyuk)community.general.ipinfoio_facts (0.2.1) — module
Install with ansible-galaxy collection install community.general:==0.2.1
collections: - name: community.general version: 0.2.1
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