�
�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 d d l m
Z
m Z d
� 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: mso_schema_template_deploy
short_description: Deploy schema templates to sites
description:
- Deploy schema templates to sites.
author:
- Dag Wieers (@dagwieers)
version_added: '2.8'
options:
schema:
description:
- The name of the schema.
type: str
required: yes
template:
description:
- The name of the template.
type: str
aliases: [ name ]
site:
description:
- The name of the site B(to undeploy).
type: str
state:
description:
- Use C(deploy) to deploy schema template.
- Use C(status) to get deployment status.
- Use C(undeploy) to deploy schema template from a site.
type: str
choices: [ deploy, status, undeploy ]
default: deploy
seealso:
- module: mso_schema_site
- module: mso_schema_template
extends_documentation_fragment: mso
s�
- name: Deploy a schema template
mso_schema_template_deploy:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
state: deploy
delegate_to: localhost
- name: Undeploy a schema template
mso_schema_template_deploy:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
site: Site 1
state: undeploy
delegate_to: localhost
- name: Get deployment status
mso_schema:
host: mso_host
username: admin
password: SomeSecretPassword
schema: Schema 1
template: Template 1
state: status
delegate_to: localhost
register: status_result
t
( t
AnsibleModule( t MSOModulet mso_argument_specc
C` s� t � } | j d t d d d t � d t d d d t d d g � d t d d � d t d d d
d d d d
d g � � t d | d t d d d d g g g � } | j d } | j d } | j d } | j d } t | � } | j | � } t d | d | � } d } | d k r.d j | | � }
n` | d
k rOd j | | � }
n? | d k r�d j | | � }
| j
| � } t d | � } n | j s�| j |
d d d | d | �} n | j
| � d S( Nt schemat typet strt requiredt templatet aliasest namet sitet statet defaultt deployt choicesR t undeployt
argument_spect supports_check_modet required_ift schemaIdt templateNames execute/schema/{0}/template/{1}s status/schema/{0}/template/{1}t methodt GETt datat qs( R t updatet dictt TrueR t paramsR
t
lookup_schemat Nonet formatt lookup_sitet
check_modet requestt exit_json(
R t moduleR R R R t msot schema_idt payloadR! t patht site_idR ( ( sZ /usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_schema_template_deploy.pyt main] s>