Documentation

ipify_facts - Retrieve the public IP of your internet gateway.

New in version 2.0.

Synopsis

If behind NAT and need to know the public IP of your internet gateway.

Options

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.

    Examples

    # 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
    

    Return Values

    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


    Notes

    Note

    Visit https://www.ipify.org to get more information.

    This is an Extras Module

    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.