ansible / ansible.builtin / v2.6.10 / module / ipify_facts Retrieve the public IP of your internet gateway. | "added in version" 2.0 of ansible.builtin" Authors: René Moser (@resmo) preview | supported by communityansible.builtin.ipify_facts (v2.6.10) — module
pip
Install with pip install ansible==2.6.10
If behind NAT and need to know the public IP of your internet gateway.
# Gather IP facts from ipify.org - name: get my public IP ipify_facts:
# Gather IP facts from your own ipify service endpoint with a custom timeout - name: get my public IP ipify_facts: api_url: http://api.example.com/ipify timeout: 20
api_url: default: https://api.ipify.org description: - URL of the ipify.org API service. - C(?format=json) will be appended per default. required: false timeout: default: 10 description: - HTTP connection timeout in seconds. required: false version_added: '2.3' version_added_collection: ansible.builtin validate_certs: default: 'yes' description: - When set to C(NO), SSL certificates will not be validated. required: false version_added: '2.4' version_added_collection: ansible.builtin
ipify_public_ip: description: Public IP of the internet gateway. returned: success sample: 1.2.3.4 type: string