�
�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
Z d d l
m Z m Z m
Z
yJ d d l m Z d d
l m Z d d l m Z d d l m Z e Z Wn e k
r� e Z 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_bysq
---
module: tower_receive
author: "John Westcott IV (@john-westcott-iv)"
version_added: "2.8"
short_description: Receive assets from Ansible Tower.
description:
- Receive assets from Ansible Tower. See
U(https://www.ansible.com/tower) for an overview.
options:
all:
description:
- Export all assets
type: bool
default: 'False'
organization:
description:
- List of organization names to export
default: []
user:
description:
- List of user names to export
default: []
team:
description:
- List of team names to export
default: []
credential_type:
description:
- List of credential type names to export
default: []
credential:
description:
- List of credential names to export
default: []
notification_template:
description:
- List of notification template names to export
default: []
inventory_script:
description:
- List of inventory script names to export
default: []
inventory:
description:
- List of inventory names to export
default: []
project:
description:
- List of project names to export
default: []
job_template:
description:
- List of job template names to export
default: []
workflow:
description:
- List of workflow names to export
default: []
requirements:
- "ansible-tower-cli >= 3.3.0"
notes:
- Specifying a name of "all" for any asset type will export all items of that asset type.
extends_documentation_fragment: tower
sQ
- name: Export all tower assets
tower_receive:
all: True
tower_config_file: "~/tower_cli.cfg"
- name: Export all inventories
tower_receive:
inventory:
- all
- name: Export a job template named "My Template" and all Credentials
tower_receive:
job_template:
- "My Template"
credential:
- all
sj
assets:
description: The exported assets
returned: success
type: dict
sample: [ {}, {} ]
( t TowerModulet tower_auth_configt
HAS_TOWER_CLI( t Receiver( t
SEND_ORDER( t
TowerCLIError( t settingsc C` s8 t d t d d d t � d t d d d g � d t d d d g � d t d d d g � d t d d d g � d
t d d d g � d t d d d g � d t d d d g � d
t d d d g � d t d d d g � d t d d d g � d t d d d g � � } t d | d t � } t s3| j d d � n t sL| j d d � n | j j d � } i } x$ t D] } | j j | � | | <qkWt d d d t d d � } t
| � } t j | � �q y6 t
� } | j d | d | � | d <| j | � Wn3 t k
r-} | j | d <| j d d | � n XWd QXd S( Nt allt typet boolt defaultt
credentialt listt credential_typet inventoryt inventory_scriptt job_templatet notification_templatet organizationt projectt teamt usert workflowt
argument_spect supports_check_modet msgs* ansible-tower-cli required for this modules1 ansible-tower-cli version does not support exportt assetst changedt messaget t asset_inputs Receive Failed( t dictt FalseR R
t fail_jsont TOWER_CLI_HAS_EXPORTt paramst getR t NoneR R t runtime_valuesR t
export_assetst exit_jsonR
R$ ( R t modulet
export_allt assets_to_exportt
asset_typet resultt
tower_autht receivert e( ( sb /usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_receive.pyt main} sF
t __main__N( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt"