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/dnsimple.pyc

�
�Udac@`sddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlm
Z
dZy:dd
lmZddlmZddlmZeZWn#ek
r�ej�ZeZnXddlmZmZd�Zedkre�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: dnsimple
version_added: "1.6"
short_description: Interface with dnsimple.com (a DNS hosting service)
description:
   - "Manages domains and records via the DNSimple API, see the docs: U(http://developer.dnsimple.com/)."
notes:
  - DNSimple API v1 is deprecated. Please install dnsimple-python>=1.0.0 which uses v2 API.
options:
  account_email:
    description:
      - Account email. If omitted, the environment variables C(DNSIMPLE_EMAIL) and C(DNSIMPLE_API_TOKEN) will be looked for.
      - "If those aren't found, a C(.dnsimple) file will be looked for, see: U(https://github.com/mikemaccana/dnsimple-python#getting-started)."
    type: str
  account_api_token:
    description:
      - Account API token. See I(account_email) for more information.
    type: str
  domain:
    description:
      - Domain to work with. Can be the domain name (e.g. "mydomain.com") or the numeric ID of the domain in DNSimple.
      - If omitted, a list of domains will be returned.
      - If domain is present but the domain doesn't exist, it will be created.
    type: str
  record:
    description:
      - Record to add, if blank a record for the domain will be created, supports the wildcard (*).
    type: str
  record_ids:
    description:
      - List of records to ensure they either exist or do not exist.
    type: list
  type:
    description:
      - The type of DNS record to create.
    choices: [ 'A', 'ALIAS', 'CNAME', 'MX', 'SPF', 'URL', 'TXT', 'NS', 'SRV', 'NAPTR', 'PTR', 'AAAA', 'SSHFP', 'HINFO', 'POOL' ]
    type: str
  ttl:
    description:
      - The TTL to give the new record in seconds.
    default: 3600
    type: int
  value:
    description:
      - Record value.
      - Must be specified when trying to ensure a record exists.
    type: str
  priority:
    description:
      - Record priority.
    type: int
  state:
    description:
      - whether the record should exist or not.
    choices: [ 'present', 'absent' ]
    default: present
    type: str
  solo:
    description:
      - Whether the record should be the only one for that record type and record name.
      - Only use with C(state) is set to C(present) on a record.
    type: 'bool'
    default: no
requirements:
  - "dnsimple >= 1.0.0"
author: "Alex Coomans (@drcapulet)"
s�
- name: Authenticate using email and API token and fetch all domains
  dnsimple:
    account_email: [email protected]
    account_api_token: dummyapitoken
  delegate_to: localhost

- name: Fetch my.com domain records
  dnsimple:
    domain: my.com
    state: present
  delegate_to: localhost
  register: records

- name: Delete a domain
  dnsimple:
    domain: my.com
    state: absent
  delegate_to: localhost

- name: Create a test.my.com A record to point to 127.0.0.1
  dnsimple:
    domain: my.com
    record: test
    type: A
    value: 127.0.0.1
  delegate_to: localhost
  register: record

- name: Delete record using record_ids
  dnsimple:
    domain: my.com
    record_ids: '{{ record["id"] }}'
    state: absent
  delegate_to: localhost

- name: Create a my.com CNAME record to example.com
  dnsimple:
    domain: my.com
    record: ''
    type: CNAME
    value: example.com
    state: present
  delegate_to: localhost

- name: change TTL value for a record
  dnsimple:
    domain: my.com
    record: ''
    type: CNAME
    value: example.com
    ttl: 600
    state: present
  delegate_to: localhost

- name: Delete the record
  dnsimple:
    domain: my.com
    record: ''
    type: CNAME
    value: example.com
    state: absent
  delegate_to: localhost
s# N(tLooseVersion(tDNSimple(t__version__(tDNSimpleException(t
AnsibleModuletmissing_required_libc!`s�tdtdtdd�dtdddt�dtdd�dtdd�d	tdd
�dtddddd
dddddddddddddg�dtdddd�dtdd�d tdd�d!tdddd"d#gdd"�d$tdd%dt��d&ddggd't�}tsH|jd(td)�d*t�ntt	�td+�krw|jd(d,t	�n|j
jd�}|j
jd�}|j
jd��|j
jd��|j
jd	�}|j
jd��|j
jd�}|j
jd��|j
jd �}|j
jd!�}|j
jd$�}|ra|ratd-|d.|�}n]t
jjd/�r�t
jjd0�r�td-t
jjd/�d.t
jjd0��}n	t�}y��s|j�}	|jd1td2g|	D]}
|
d^q��n�r>�dkr>|r>g|j�D]}
|
d^q)}	�j�rmt�fd3�|	D�d�}nt�fd4�|	D�d�}|d"kr�|r�|jd1td2|�q;|jr�|jd1t�q;|jd1td2|j��d�q>|r+|js|j��n|jd1t�q>|jd1t�n�rM�dk	rMg|jt��d5i�d66�D]}|d^qs}
�s�|jd(d7�n�s�|jd(d8�nt���fd9�|
D�d�}|d"kr�t}|r�g|
D]0}|d6�kr�|d�kr�|d:^q�}|rgg|D]}||d:krB|^qB}n|r�|js�x'|D]}|jt��|�q}Wnt}q�n|ro|d|ks�|d |krVi}|r�||d<n|r�||d <n|jr|jd1t�ql|jd1td2|jt��t|d:�|�d�q�|jd1|d2|�qJi�d66�d6�d;6}|r�||d<n|r�||d <n|jr�|jd1t�qJ|jd1td2|jt��|�d�qM|r:|js'|jt��|d:�n|jd1t�qM|jd1t�n�r�|r�g|jt���D]}t|dd:�^qo}g|D]}t|�^q�}|d"krtt|�t|��}|r�|jd(d<|�q~|jd1t�q�tt|�t|�@�}|rn|js[x'|D]}|jt��|�q8Wn|jd1t�q�|jd1t�nWn*tk
r�}|jd(d=|j�nX|jd(d>�dS(?Nt
argument_spect
account_emailttypetstrtaccount_api_tokentno_logtdomaintrecordt
record_idstlisttchoicestAtALIAStCNAMEtMXtSPFtURLtTXTtNStSRVtNAPTRtPTRtAAAAtSSHFPtHINFOtPOOLtttltinttdefaultitvaluetprioritytstatetpresenttabsenttsolotbooltrequired_togethertsupports_check_modetmsgtdnsimplet	exceptions1.0.0s�Current version of dnsimple Python module [%s] uses 'v1' API which is deprecated. Please upgrade to version 1.0.0 and above to use dnsimple 'v2' API.temailt	api_tokentDNSIMPLE_EMAILtDNSIMPLE_API_TOKENtchangedtresultc3`s+|]!}|dt��kr|VqdS(tidN(R)(t.0td(R(sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/dnsimple.pys	<genexpr>�sc3`s%|]}|d�kr|VqdS(tnameN((R>R?(R(sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/dnsimple.pys	<genexpr>�stparamsR@sMissing the record typesMissing the record valuec3`sE|];}|d�kr|d�kr|d�kr|VqdS(R@RtcontentN((R>tr(Rtrecord_typeR+(sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/dnsimple.pys	<genexpr>sR=RBs!Missing the following records: %ssUnable to contact DNSimple: %ss Unknown what you wanted me to do( RtdicttTruetFalsetHAS_DNSIMPLEt	fail_jsonR
tDNSIMPLE_IMP_ERRRtdnsimple_versionRAtgetR	tostenvirontdomainst	exit_jsontNonetisdigittnextt
check_modet
add_domaintdeletetrecordsRt
delete_recordt
update_recordt
add_recordRtsetRtmessage(tmoduleRRRR(R,R-tis_solotclientROR?tdrRCRWtrrR;t	same_typetridtdatatcurrent_recordstwanted_recordst
differencete((RRRDR+sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/dnsimple.pytmain�s�6!	$0	0#"	&	9%=,	
 

	<


	/	6	
t__main__( t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRMt	tracebacktdistutils.versionRRQRJR5R	tdnsimple.dnsimpleR
RKRRFRHtImportErrort
format_excRGtansible.module_utils.basicRR
Rit__name__(((sF/usr/lib/python2.7/site-packages/ansible/modules/net_tools/dnsimple.pyt<module>s0

GA


	�

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