Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.ipinfoio_facts
.
Parameter | Choices/Defaults | Comments |
---|---|---|
http_agent string | Default: "ansible-ipinfoio-module/0.0.1" | Set http user agent |
timeout string | Default: 10 | HTTP connection timeout in seconds |
Note
# Retrieve geolocation data of a host's IP address - name: Get IP geolocation data community.general.ipinfoio_facts:
Facts returned by this module are added/updated in the hostvars
host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
Fact | Returned | Description |
---|---|---|
city string / elements=string | success | City name Sample: Mountain View |
country string / elements=string | success | ISO 3166-1 alpha-2 country code Sample: US |
hostname string / elements=string | success | Domain name Sample: google-public-dns-a.google.com |
ip string / elements=string | success | Public IP address of a host Sample: 8.8.8.8 |
loc string / elements=string | success | Latitude and Longitude of the location Sample: 37.3860,-122.0838 |
org string / elements=string | success | organization's name Sample: AS3356 Level 3 Communications, Inc. |
postal string / elements=string | success | Postal code Sample: 94035 |
region string / elements=string | success | State or province name Sample: California |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/ipinfoio_facts_module.html