cisco.ise.ipsec 模块 – Ipsec 资源模块

注意

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

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

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

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

cisco.ise 1.0.0 中的新增功能

概要

  • 管理 Ipsec 资源的创建和更新操作。

  • 创建 IPsec 连接。

  • 更新现有 IPsec 连接的配置。

注意

此模块具有相应的 action 插件

要求

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

  • ciscoisesdk >= 2.2.3

  • python >= 3.5

参数

参数

注释

authType

字符串

建立连接的身份验证类型。

certId

字符串

用于建立连接的证书的 ID。

configureVti

布尔值

建立连接的身份验证类型。

选项

  • false

  • true

espAhProtocol

字符串

用于建立连接的加密协议。

hostName

字符串

节点的主机名。

iface

字符串

节点的以太网端口。

ikeReAuthTime

整数

IKE 重新身份验证时间。

ikeVersion

字符串

IKE 版本。

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 网关发送请求的标志。

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

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

选项

  • false

  • true ← (默认)

ise_uses_csrf_token

布尔值

在 cisco.ise 3.0.0 中添加

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

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

如果为真,则假定您需要 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 ← (默认)

localInternalIp

字符串

本地隧道 IP 地址。

modeOption

字符串

用于建立连接的模式类型。

nadIp

字符串

用于建立连接的 NAD IP 地址。

phaseOneDHGroup

字符串

用于建立连接的第一阶段 DH 组。

phaseOneEncryptionAlgo

字符串

用于建立连接的第一阶段加密算法。

phaseOneHashAlgo

字符串

用于建立连接的第一阶段哈希算法。

phaseOneLifeTime

整数

第一阶段连接生命周期。

phaseTwoDHGroup

字符串

用于建立连接的第二阶段 DH 组。

phaseTwoEncryptionAlgo

字符串

用于建立连接的第二阶段加密算法。

phaseTwoHashAlgo

字符串

用于建立连接的第二阶段哈希算法。

phaseTwoLifeTime

整数

第二阶段连接生命周期。

psk

字符串

用于建立连接的预共享密钥。

remotePeerInternalIp

字符串

远程隧道 IP 地址。

备注

注意

  • 使用的SDK方法为native_ipsec.NativeIpsec.create_ipsec_connection, native_ipsec.NativeIpsec.update_ipsec_connection_config,

  • 使用的路径为 post /api/v1/ipsec, put /api/v1/ipsec,

  • 不支持 check_mode

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

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

示例

- name: Update all
  cisco.ise.ipsec:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    authType: string
    certId: string
    configureVti: true
    espAhProtocol: string
    hostName: string
    iface: string
    ikeReAuthTime: 0
    ikeVersion: string
    localInternalIp: string
    modeOption: string
    nadIp: string
    phaseOneDHGroup: string
    phaseOneEncryptionAlgo: string
    phaseOneHashAlgo: string
    phaseOneLifeTime: 0
    phaseTwoDHGroup: string
    phaseTwoEncryptionAlgo: string
    phaseTwoHashAlgo: string
    phaseTwoLifeTime: 0
    psk: string
    remotePeerInternalIp: string

- name: Create
  cisco.ise.ipsec:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    authType: string
    certId: string
    configureVti: true
    espAhProtocol: string
    hostName: string
    iface: string
    ikeReAuthTime: 0
    ikeVersion: string
    localInternalIp: string
    modeOption: string
    nadIp: string
    phaseOneDHGroup: string
    phaseOneEncryptionAlgo: string
    phaseOneHashAlgo: string
    phaseOneLifeTime: 0
    phaseTwoDHGroup: string
    phaseTwoEncryptionAlgo: string
    phaseTwoHashAlgo: string
    phaseTwoLifeTime: 0
    psk: string
    remotePeerInternalIp: string

返回值

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

描述

ise_response

列表 / 元素=字典

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

返回值:始终

示例: "[\n  {\n    \"authType\": \"string\",\n    \"certId\": \"string\",\n    \"configureVti\": true,\n    \"createTime\": \"string\",\n    \"espAhProtocol\": \"string\",\n    \"hostName\": \"string\",\n    \"id\": \"string\",\n    \"iface\": \"string\",\n    \"ikeReAuthTime\": 0,\n    \"ikeVersion\": \"string\",\n    \"localInternalIp\": \"string\",\n    \"modeOption\": \"string\",\n    \"nadIp\": \"string\",\n    \"phaseOneDHGroup\": \"string\",\n    \"phaseOneEncryptionAlgo\": \"string\",\n    \"phaseOneHashAlgo\": \"string\",\n    \"phaseOneLifeTime\": 0,\n    \"phaseTwoDHGroup\": \"string\",\n    \"phaseTwoEncryptionAlgo\": \"string\",\n    \"phaseTwoHashAlgo\": \"string\",\n    \"phaseTwoLifeTime\": 0,\n    \"psk\": \"string\",\n    \"remotePeerInternalIp\": \"string\",\n    \"status\": \"string\",\n    \"updateTime\": \"string\"\n  }\n]\n"

ise_update_response

字典

在 cisco.ise 1.1.0 中添加

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

返回值:始终

示例: {"response": {"authType": "string", "certId": "string", "configureVti": true, "createTime": "string", "espAhProtocol": "string", "hostName": "string", "id": "string", "iface": "string", "ikeReAuthTime": 0, "ikeVersion": "string", "link": {"href": "string", "rel": "string", "type": "string"}, "localInternalIp": "string", "modeOption": "string", "nadIp": "string", "phaseOneDHGroup": "string", "phaseOneEncryptionAlgo": "string", "phaseOneHashAlgo": "string", "phaseOneLifeTime": 0, "phaseTwoDHGroup": "string", "phaseTwoEncryptionAlgo": "string", "phaseTwoHashAlgo": "string", "phaseTwoLifeTime": 0, "psk": "string", "remotePeerInternalIp": "string", "status": "string", "updateTime": "string"}, "version": "string"}

作者

  • Rafael Campos (@racampos)