New in version 2.0.
If behind NAT and need to know the public IP of your internet gateway.
parameter | required | default | choices | comments |
---|---|---|---|---|
api_url |
no | https://api.ipify.org | URL of the ipify.org API service. ?format=json will be appended per default. |
# Gather IP facts from ipify.org - name: get my public IP ipify_facts: # Gather IP facts from your own ipify service endpoint - name: get my public IP ipify_facts: api_url=http://api.example.com/ipify
Common return values are documented here Common Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
ipify_public_ip | Public IP of the internet gateway. | success | string | 1.2.3.4 |
Note
Visit https://www.ipify.org to get more information.
For more information on what this means please read Extras Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.