Documentation

ipinfoio_facts - Retrieve IP geolocation facts of a host’s IP address

New in version 2.3.

Synopsis

  • Gather IP geolocation facts of a host’s IP address using ipinfo.io API

Options

parameter required default choices comments
http_agent
no ansible-ipinfoio-module/0.0.1
Set http user agent
timeout
no 10
HTTP connection timeout in seconds

Examples

# Retrieve geolocation data of a host's IP address
- name: get IP geolocation data
  ipinfoio_facts:

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
ansible_facts Dictionary of ip geolocation facts for a host's IP address changed dictionary
contains:
name description returned type sample
loc Latitude and Longitude of the location string 37.3860,-122.0838
city City name string Mountain View
ip Public IP address of a host string 8.8.8.8
region State or province name string California
hostname Domain name string google-public-dns-a.google.com
country ISO 3166-1 alpha-2 country code string US
org organization's name string AS3356 Level 3 Communications, Inc.
postal Postal code string 94035


Notes

Note

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.