Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/net_tools/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/net_tools/ipify_facts.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZddlmZdefd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: ipify_facts
short_description: Retrieve the public IP of your internet gateway
description:
  - If behind NAT and need to know the public IP of your internet gateway.
version_added: '2.0'
author:
- René Moser (@resmo)
options:
  api_url:
    description:
      - URL of the ipify.org API service.
      - C(?format=json) will be appended per default.
    type: str
    default: https://api.ipify.org/
  timeout:
    description:
      - HTTP connection timeout in seconds.
    type: int
    default: 10
    version_added: "2.3"
  validate_certs:
    description:
      - When set to C(NO), SSL certificates will not be validated.
    type: bool
    default: yes
    version_added: "2.4"
notes:
  - Visit https://www.ipify.org to get more information.
s�
# 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
sz
---
ipify_public_ip:
  description: Public IP of the internet gateway.
  returned: success
  type: str
  sample: 1.2.3.4
N(t
AnsibleModule(t	fetch_url(tto_textt
IpifyFactscB`seZd�Zd�ZRS(cC`s.tjjd�|_tjjd�|_dS(Ntapi_urlttimeout(tmoduletparamstgetRR
(tself((sI/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ipify_facts.pyt__init__Nsc	C`s�idd6}tdtd|jddtd|j�\}}|sgtjdd|j|jf�ntjt	|j
���}|jd	�|d<|S(
Ntipify_public_ipRturls?format=jsontforceR
tmsgs?No valid or no response from url %s within %s seconds (timeout)tip(tNoneR	RRtTrueR
t	fail_jsontjsontloadsR
treadR(Rtresulttresponsetinfotdata((sI/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ipify_facts.pytrunRs
1#(t__name__t
__module__RR"(((sI/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ipify_facts.pyRLs	c
C`s�tdtdtdddd�dtdddd	�d
tdddt��dt�at�j�}td
td|�}tj|�dS(Nt
argument_specRttypetstrtdefaultshttps://api.ipify.org/R
tinti
tvalidate_certstbooltsupports_check_modetchangedt
ansible_facts(RtdictRRRR"tFalset	exit_json(tipify_factstipify_facts_result((sI/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ipify_facts.pytmain`s	t__main__(t
__future__RRRR&t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRtansible.module_utils.basicRtansible.module_utils.urlsR	tansible.module_utils._textR
tobjectRR4R#(((sI/usr/lib/python2.7/site-packages/ansible/modules/net_tools/ipify_facts.pyt<module>s


!		

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]