cisco.dnac.configuration_template_v1_info 模块 – 用于配置模板 V1 的信息模块

注意

此模块是 cisco.dnac 集合 (版本 6.25.0) 的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install cisco.dnac。您需要其他要求才能使用此模块,有关详细信息,请参阅要求

要在 playbook 中使用它,请指定:cisco.dnac.configuration_template_v1_info

cisco.dnac 3.1.0 中的新增功能

概要

  • 获取所有配置模板 V1。

  • 通过 ID 获取配置模板 V1。

  • 按其 ID 获取模板的详细信息。

  • 列出可用的模板。

注意

此模块具有对应的 操作插件

要求

执行此模块的主机上需要以下要求。

  • dnacentersdk >= 2.4.9

  • python >= 3.5

参数

参数

注释

dnac_debug

布尔值

用于 Cisco DNA Center SDK 启用调试的标志。

选项

  • false ←(默认)

  • true

dnac_host

字符串 / 必需

Cisco DNA Center 主机名。

dnac_password

字符串

用于身份验证的 Cisco DNA Center 密码。

dnac_port

整数

Cisco DNA Center 端口。

默认值: 443

dnac_username

别名:user

字符串

用于身份验证的 Cisco DNA Center 用户名。

默认值: "admin"

dnac_verify

布尔值

启用或禁用 SSL 证书验证的标志。

选项

  • false

  • true ←(默认)

dnac_version

字符串

通知 SDK 要使用的 Cisco DNA Center 版本。

默认值: "2.3.7.6"

filterConflictingTemplates

布尔值

FilterConflictingTemplates 查询参数。根据冲突模板过滤模板。

选项

  • false

  • true

headers

字典

其他标头。

latestVersion

布尔值

LatestVersion 查询参数。LatestVersion 标志用于获取最新版本的模板。

选项

  • false

  • true

productFamily

字符串

ProductFamily 查询参数。根据设备系列过滤模板。

productSeries

字符串

ProductSeries 查询参数。根据设备系列过滤模板。

productType

字符串

ProductType 查询参数。根据设备类型过滤模板。

projectId

字符串

ProjectId 查询参数。根据项目 UUID 过滤模板。

projectNames

列表 / elements=string

ProjectNames 查询参数。根据项目名称过滤模板。

softwareType

字符串

SoftwareType 查询参数。根据软件类型过滤模板。

softwareVersion

字符串

SoftwareVersion 查询参数。根据软件版本过滤模板。

sortOrder

字符串

SortOrder 查询参数。排序顺序,升序 (asc) 或降序 (des)。

tags

列表 / elements=string

Tags 查询参数。根据标签过滤模板。

templateId

字符串

TemplateId 路径参数。TemplateId (UUID) 用于获取模板的详细信息。

unCommitted

布尔值

UnCommitted 查询参数。根据模板是否已提交来过滤模板。

选项

  • false

  • true

validate_response_schema

布尔值

用于 Cisco DNA Center SDK 启用根据 JSON 模式验证请求体的标志。

选项

  • false

  • true ←(默认)

注意

注意

  • 使用的 SDK 方法是 configuration_templates.ConfigurationTemplates.get_template_details,configuration_templates.ConfigurationTemplates.gets_the_templates_available_v1,

  • 使用的路径是 get /dna/intent/api/v1/template-programmer/template,get /dna/intent/api/v1/template-programmer/template/{templateId},

  • 支持 check_mode

  • 该插件在控制节点上运行,不使用任何 Ansible 连接插件,而是使用 Cisco DNAC SDK 的嵌入式连接管理器

  • 以 dnac_ 开头的参数由 Cisco DNAC Python SDK 用于建立连接

另请参阅

另请参阅

Cisco DNA Center 配置模板文档,关于 GetsDetailsOfAGivenTemplateV1

GetsDetailsOfAGivenTemplateV1 API 的完整参考。

Cisco DNA Center 配置模板文档,关于 GetsTheTemplatesAvailableV1

GetsTheTemplatesAvailableV1 API 的完整参考。

示例

- name: Get all Configuration Template V1
  cisco.dnac.configuration_template_v1_info:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    headers: "{{my_headers | from_json}}"
    projectId: string
    softwareType: string
    softwareVersion: string
    productFamily: string
    productSeries: string
    productType: string
    filterConflictingTemplates: True
    tags: []
    projectNames: []
    unCommitted: True
    sortOrder: string
  register: result

- name: Get Configuration Template V1 by id
  cisco.dnac.configuration_template_v1_info:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    headers: "{{my_headers | from_json}}"
    latestVersion: True
    templateId: string
  register: result

返回值

常用返回值已在此处记录,以下是此模块独有的字段

描述

dnac_response

字典

一个字典或列表,包含 Cisco DNAC Python SDK 返回的响应

返回: 始终

示例: {"author": "string", "composite": true, "containingTemplates": [{"composite": true, "description": "string", "deviceTypes": [{"productFamily": "string", "productSeries": "string", "productType": "string"}], "id": "string", "language": "string", "name": "string", "projectName": "string", "rollbackTemplateParams": [{"binding": "string", "customOrder": 0, "dataType": "string", "defaultValue": "string", "description": "string", "displayName": "string", "group": "string", "id": "string", "instructionText": "string", "key": "string", "notParam": true, "order": 0, "paramArray": true, "parameterName": "string", "provider": "string", "range": [{"id": "string", "maxValue": 0, "minValue": 0}], "required": true, "selection": {"defaultSelectedValues": ["string"], "id": "string", "selectionType": "string", "selectionValues": {}}}], "tags": [{"id": "string", "name": "string"}], "templateContent": "string", "templateParams": [{"binding": "string", "customOrder": 0, "dataType": "string", "defaultValue": "string", "description": "string", "displayName": "string", "group": "string", "id": "string", "instructionText": "string", "key": "string", "notParam": true, "order": 0, "paramArray": true, "parameterName": "string", "provider": "string", "range": [{"id": "string", "maxValue": 0, "minValue": 0}], "required": true, "selection": {"defaultSelectedValues": ["string"], "id": "string", "selectionType": "string", "selectionValues": {}}}], "version": "string"}], "createTime": 0, "customParamsOrder": true, "description": "string", "deviceTypes": [{"productFamily": "string", "productSeries": "string", "productType": "string"}], "failurePolicy": "string", "id": "string", "language": "string", "lastUpdateTime": 0, "latestVersionTime": 0, "name": "string", "parentTemplateId": "string", "projectId": "string", "projectName": "string", "rollbackTemplateContent": "string", "rollbackTemplateParams": [{"binding": "string", "customOrder": 0, "dataType": "string", "defaultValue": "string", "description": "string", "displayName": "string", "group": "string", "id": "string", "instructionText": "string", "key": "string", "notParam": true, "order": 0, "paramArray": true, "parameterName": "string", "provider": "string", "range": [{"id": "string", "maxValue": 0, "minValue": 0}], "required": true, "selection": {"defaultSelectedValues": ["string"], "id": "string", "selectionType": "string", "selectionValues": {}}}], "softwareType": "string", "softwareVariant": "string", "softwareVersion": "string", "tags": [{"id": "string", "name": "string"}], "templateContent": "string", "templateParams": [{"binding": "string", "customOrder": 0, "dataType": "string", "defaultValue": "string", "description": "string", "displayName": "string", "group": "string", "id": "string", "instructionText": "string", "key": "string", "notParam": true, "order": 0, "paramArray": true, "parameterName": "string", "provider": "string", "range": [{"id": "string", "maxValue": 0, "minValue": 0}], "required": true, "selection": {"defaultSelectedValues": ["string"], "id": "string", "selectionType": "string", "selectionValues": {}}}], "validationErrors": {"rollbackTemplateErrors": {}, "templateErrors": {}, "templateId": "string", "templateVersion": "string"}, "version": "string"}

作者

  • Rafael Campos (@racampos)