Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_label.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	m
Z
mZmZy/ddl
Z
ddljZddlmZWnek
r�nXd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: tower_label
author: "Wayne Witzel III (@wwitzel3)"
version_added: "2.3"
short_description: create, update, or destroy Ansible Tower label.
description:
    - Create, update, or destroy Ansible Tower labels. See
      U(https://www.ansible.com/tower) for an overview.
options:
    name:
      description:
        - Name to use for the label.
      required: True
    organization:
      description:
        - Organization the label should be applied to.
      required: True
    state:
      description:
        - Desired state of the resource.
      default: "present"
      choices: ["present", "absent"]
extends_documentation_fragment: tower
s�
- name: Add label to tower organization
  tower_label:
    name: Custom Label
    organization: My Organization
    state: present
    tower_config_file: "~/tower_cli.cfg"
(tTowerModulettower_auth_configttower_check_modeN(tsettingscC`stdtdt�dtdt�dtdddgdd��}td	|d
t�}|jjd�}|jjd�}|jjd�}i|d6|d6}t|�}tj|��.t|�t	j
d�}y�t	j
d�}|jd|�}	|dkr9|jd|d|	dd
t�}
|
d|d<n+|dkrd|jd|d|	d�}
nWn~t
jk
r�}|jddj|�dt�nJt
jt
jt
jt
jfk
r�}|jddj|�dt�nXWdQX|
d|d<|j|�dS(Ntnametrequiredtorganizationtstatetchoicestpresenttabsenttdefaultt
argument_spectsupports_check_modetlabeltidtcreate_on_missingtmsgs3Failed to update label, organization not found: {0}tchangedsFailed to update label: {0}(tdicttTrueRtparamstgetR	Rtruntime_valuesR
t	tower_clitget_resourcetmodifytdeletetexctNotFoundt	fail_jsontformattFalsetConnectionErrort
BadRequestt	AuthErrort	exit_json(RtmoduleRRRtjson_outputt
tower_authRtorg_restorgtresulttexcinfo((s`/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_label.pytmain?s6
"#"')t__main__(t
__future__RRRttypet
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESt"ansible.module_utils.ansible_towerRR	R
R ttower_cli.exceptionst
exceptionsR$ttower_cli.confRtImportErrorR4t__name__(((s`/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_label.pyt<module>s 




	&

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