cisco.ise.anc_policy 模块 – ANC策略资源模块

注意

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

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

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

要在剧本中使用它,请指定: cisco.ise.anc_policy

cisco.ise 1.0.0 中的新增功能

概要

  • 管理ANC策略资源的创建、更新和删除操作。

  • 此API允许客户端创建ANC策略。

  • 此API允许客户端删除ANC策略。

  • 此API允许客户端更新ANC策略。

注意

此模块具有相应的 action插件

要求

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

  • ciscoisesdk >= 2.2.3

  • python >= 3.5

参数

参数

注释

actions

列表 / 元素=字符串

  • QUARANTINE允许您使用异常策略(授权策略)来限制或拒绝端点访问网络。- PORTBOUNCE重置连接到端点的网络设备上的端口。- SHUTDOWN关闭连接到端点的网络设备上的端口。- RE_AUTHENTICATE重新验证端点的会话。

id

字符串

ANC策略的ID。

ise_debug

布尔值

用于Identity Services Engine SDK以启用调试。

选项

  • false ← (默认)

  • true

ise_hostname

字符串 / 必需

Identity Services Engine主机名。

ise_password

字符串 / 必需

用于身份验证的Identity Services Engine密码。

ise_single_request_timeout

整数

在cisco.ise 3.0.0中添加

RESTful HTTP请求的超时(以秒为单位)。

默认: 60

ise_username

字符串 / 必需

用于身份验证的Identity Services Engine用户名。

ise_uses_api_gateway

布尔值

在cisco.ise 1.1.0中添加

告知SDK是否使用Identity Services Engine的API网关发送请求的标志。

如果为true,则使用ISE的API网关并将请求发送到 https://{{ise_hostname}}。

如果为false,则将请求发送到 https://{{ise_hostname}}:{{port}},其中端口值取决于使用的服务(ERS、Mnt、UI、PxGrid)。

选项

  • false

  • true ← (默认)

ise_uses_csrf_token

布尔值

在cisco.ise 3.0.0中添加

告知SDK我们是否将CSRF令牌发送到ISE的ERS API的标志。

如果为True,则SDK假定您的ISE CSRF检查已启用。

如果为True,则假定您需要SDK自动为您管理CSRF令牌。

选项

  • false ← (默认)

  • true

ise_verify

布尔值

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

选项

  • false

  • true ← (默认)

ise_version

字符串

告知SDK要使用的Identity Services Engine版本。

默认: "3.1_Patch_1"

ise_wait_on_rate_limit

布尔值

用于Identity Services Engine SDK以启用自动速率限制处理的标志。

选项

  • false

  • true ← (默认)

name

字符串

ANC策略的名称。

备注

注意

  • 使用的SDK方法是anc_policy.AncPolicy.create_anc_policy、anc_policy.AncPolicy.delete_anc_policy_by_id、anc_policy.AncPolicy.update_anc_policy_by_id。

  • 使用的路径是post /ers/config/ancpolicy、delete /ers/config/ancpolicy/{id}、put /ers/config/ancpolicy/{id}。

  • 不支持 check_mode

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

  • 以ise_开头的参数由Cisco ISE Python SDK用于建立连接。

示例

- name: Update by id
  cisco.ise.anc_policy:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    actions:
    - string
    id: string
    name: string

- name: Delete by id
  cisco.ise.anc_policy:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: absent
    id: string

- name: Create
  cisco.ise.anc_policy:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    actions:
    - string
    name: string

返回值

公共返回值已记录在 此处,以下是此模块特有的字段。

描述

ise_response

字典

包含Cisco ISE Python SDK返回的响应的字典或列表。

返回:始终

示例: {"actions": ["string"], "id": "string", "link": {"href": "string", "rel": "string", "type": "string"}, "name": "string"}

ise_update_response

字典

在cisco.ise 1.1.0中添加

包含Cisco ISE Python SDK返回的响应的字典或列表。

返回:始终

示例: {"UpdatedFieldsList": {"updatedField": [{"field": "string", "newValue": "string", "oldValue": "string"}]}}

作者

  • Rafael Campos (@racampos)