cisco.mso.mso_schema_template 模块 – 管理模式中的模板
注意
此模块是 cisco.mso 集合(版本 2.9.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install cisco.mso。您需要其他要求才能使用此模块,请参阅 要求了解详细信息。
要在 playbook 中使用它,请指定: cisco.mso.mso_schema_template。
概要
- 管理 Cisco ACI 多站点上的模板。 
要求
在执行此模块的主机上需要以下要求。
- 多站点编排器 v2.1 或更新版本 
参数
| 参数 | 注释 | 
|---|---|
| 在 MSO Web 界面上显示的名称。 | |
| ACI 多站点编排器主机的 IP 地址或主机名。 如果未在任务中指定该值,则将使用环境变量  | |
| 用于身份验证的登录域名。 默认值为 Local。 如果未在任务中指定该值,则将使用环境变量  当使用 HTTPAPI 连接插件时,如果未指定此属性,则将使用清单变量  | |
| 影响此 MSO 模块的输出。 
 
 
 如果未在任务中指定该值,则将使用环境变量  选项 
 | |
| 用于身份验证的密码。 如果未在任务中指定该值,则将使用环境变量  | |
| 用于 REST 连接的端口号。 默认值取决于参数 `use_ssl`。 如果未在任务中指定该值,则将使用环境变量  | |
| 模式的名称。 | |
| MSO 3.3 或更高版本支持模式的描述。 | |
| 使用  使用  MSO 4.2 或更高版本支持在空模式上使用  选项 
 | |
| 模板的名称。 | |
| MSO 3.3 或更高版本支持模板描述。 | |
| 此模板使用的租户。 | |
| 套接字级别的超时时间(以秒为单位)。 默认值为 30 秒。 如果任务中未指定该值,则将使用环境变量  | |
| 如果为  如果任务中未指定该值,则将使用环境变量  默认值为  选项 
 | |
| 如果为  如果任务中未指定该值,则将使用环境变量  当使用 HTTPAPI 连接插件时,如果未指定此属性,则将使用库存变量  当使用 HTTPAPI 连接插件(mso 或 nd)时,默认值为  选项 
 | |
| 用于身份验证的用户名。 如果任务中未指定该值,则将使用环境变量  | |
| 如果为  仅当在个人控制的站点上使用自签名证书时,才应将其设置为  如果任务中未指定该值,则将使用环境变量  默认值为  选项 
 | 
说明
注意
- 由于 MSO REST API 的限制,此模块会在需要时创建模式,并在删除最后一个模板时删除它们。 
- 此模块的编写是为了支持 Multi Site Orchestrator v2.1 或更高版本。部分或全部功能可能在早期版本上无法正常工作。 
另请参阅
另请参阅
- cisco.mso.mso_schema
- 管理模式。 
- cisco.mso.mso_schema_site
- 管理模式中的站点。 
示例
- name: Add a new template to a schema
  cisco.mso.mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    template: Template 1
    state: present
- name: Remove a template from a schema
  cisco.mso.mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    template: Template 1
    state: absent
- name: Query a template
  cisco.mso.mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    template: Template 1
    state: query
  register: query_result
- name: Query all templates
  cisco.mso.mso_schema_template:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    tenant: Tenant 1
    schema: Schema 1
    state: query
  register: query_result
