�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l m
Z
m Z m Z y/ d d l
Z
d d l j Z d d l m Z Wn e k
r� n Xd
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust 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"
( t TowerModulet tower_auth_configt tower_check_modeN( t settingsc $ C` s� t d t � d t � d t � d t d d d d d g d
d � d t � d t � d
t � d t d d d
t � d t d d d
t � d t d d d
t � d t d d d
d � d t d d d
d � d t � d t � d t d d d g d
d � � } t d | d t � } | j j d � } | j j d � } | j j d � } | j j d � } | d k rhd } n | j j d � } | j j d � } | j j d � } | j j d
� } | j j d � }
| j j d � } | j j d � } | j j d � }
| j j d � } | j j d � } | j j d � } i | d 6| d 6} t | � } t j | � �Xt | � t
j d � } y�| d k rHy% t
j d � } | j d | � } Wn5 t j
k
r�} | j d d! j | � d"