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_project.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_project
author: "Wayne Witzel III (@wwitzel3)"
version_added: "2.3"
short_description: create, update, or destroy Ansible Tower projects
description:
    - Create, update, or destroy Ansible Tower projects. See
      U(https://www.ansible.com/tower) for an overview.
options:
    name:
      description:
        - Name to use for the project.
      required: True
    description:
      description:
        - Description to use for the project.
    scm_type:
      description:
        - Type of SCM resource.
      choices: ["manual", "git", "hg", "svn"]
      default: "manual"
    scm_url:
      description:
        - URL of SCM resource.
    local_path:
      description:
        - The server playbook directory for manual projects.
    scm_branch:
      description:
        - The branch to use for the SCM resource.
    scm_credential:
      description:
        - Name of the credential to use with this SCM resource.
    scm_clean:
      description:
        - Remove local modifications before updating.
      type: bool
      default: 'no'
    scm_delete_on_update:
      description:
        - Remove the repository completely before updating.
      type: bool
      default: 'no'
    scm_update_on_launch:
      description:
        - Before an update to the local repository before launching a job with this project.
      type: bool
      default: 'no'
    scm_update_cache_timeout:
      version_added: "2.8"
      description:
        - Cache Timeout to cache prior project syncs for a certain number of seconds.
            Only valid if scm_update_on_launch is to True, otherwise ignored.
      default: 0
    job_timeout:
      version_added: "2.8"
      description:
        - The amount of time (in seconds) to run before the SCM Update is canceled. A value of 0 means no timeout.
      default: 0
    custom_virtualenv:
      version_added: "2.8"
      description:
        - Local absolute file path containing a custom Python virtualenv to use
    organization:
      description:
        - Primary key of organization for project.
    state:
      description:
        - Desired state of the resource.
      default: "present"
      choices: ["present", "absent"]
extends_documentation_fragment: tower
s
- name: Add tower project
  tower_project:
    name: "Foo"
    description: "Foo bar project"
    organization: "test"
    state: present
    tower_config_file: "~/tower_cli.cfg"

- name: Add Tower Project with cache timeout and custom virtualenv
  tower_project:
    name: "Foo"
    description: "Foo bar project"
    organization: "test"
    scm_update_on_launch: True
    scm_update_cache_timeout: 60
    custom_virtualenv: "/var/lib/awx/venv/ansible-2.2"
    state: present
    tower_config_file: "~/tower_cli.cfg"
(tTowerModulettower_auth_configttower_check_modeN(tsettingsc$C`s�tdt�dt�dt�dtddddd	gd
d�dt�dt�d
t�dtddd
t�dtddd
t�dtddd
t�dtddd
d�dtddd
d�dt�dt�dtdddgd
d��}td|dt�}|jjd�}|jjd�}|jjd�}|jjd�}|dkrhd}n|jjd�}|jjd�}|jjd�}|jjd
�}	|jjd�}
|jjd�}|jjd�}|jjd�}
|jjd�}|jjd�}|jjd�}i|d6|d6}t|�}tj|��Xt	|�t
jd�}y�|dkrHy%t
jd�}|jd|�}Wn5tj
k
r�}|jd d!j|�d"t�nX|	r�y�t
jd#�}y|jd|	�}WnKt
jjk
r^}|jd$j|	��|jd|	d|d%�}nX|d%}	Wq�tj
k
r�}|jd d&j|	�d"t�q�Xn|
dk	r�|tk	r�|jd'�n|jd|d|d|d%d|d|d|d|d|
d#|	d|d|d|
d|d|d(t�}|d%|d%<n!|dkri|jd|�}nWnDtjtjtjfk
r�}|jd d)j|�d"t�nXWdQX|d"|d"<|j|�dS(*Ntnametdescriptiontorganizationtscm_typetchoicestmanualtgitthgtsvntdefaulttscm_urlt
scm_branchtscm_credentialt	scm_cleanttypetbooltscm_delete_on_updatetscm_update_on_launchtscm_update_cache_timeouttintitjob_timeouttcustom_virtualenvt
local_pathtstatetpresenttabsentt
argument_spectsupports_check_modettprojecttmsgs5Failed to update project, organization not found: {0}tchangedt
credentialsPMultiple credentials found for {0}, falling back looking in project organizationtids3Failed to update project, credential not found: {0}sWscm_update_cache_timeout will be ignored since scm_update_on_launch was not set to truetcreate_on_missingsFailed to update project: {0}(tdicttFalseRtTruetparamstgetR	Rtruntime_valuesR
t	tower_clitget_resourcetexctNotFoundt	fail_jsontformatt
exceptionstMultipleResultstwarntNonetmodifytdeletetConnectionErrort
BadRequestt	AuthErrort	exit_json(R&tmoduleRR
RRRR"RRRRRRR R!R#tjson_outputt
tower_authR)torg_restorgtexcinfotcred_restcredtmulti_res_excinfotresult((sb/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_project.pytmain|s�			!						
# &
	!)t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESt"ansible.module_utils.ansible_towerRR	R
R5ttower_cli.exceptionsR;R7ttower_cli.confRtImportErrorROt__name__(((sb/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_project.pyt<module>s 


L
	X

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