cisco.ise.hotspot_portal 模块 – 热点门户的资源模块

注意

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

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

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

要在 playbook 中使用它,请指定:cisco.ise.hotspot_portal

cisco.ise 1.0.0 中的新增功能

概要

  • 管理热点门户资源的创建、更新和删除操作。

  • 此 API 创建一个热点门户。

  • 此 API 按 ID 删除热点门户。

  • 此 API 允许客户端按 ID 更新热点门户。

注意

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

要求

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

  • ciscoisesdk >= 2.2.3

  • python >= 3.5

参数

参数

注释

customizations

字典

定义所有可用的门户自定义项。

globalCustomizations

字典

热点门户的 globalCustomizations。

backgroundImage

字典

热点门户的 backgroundImage。

data

字符串

表示为图像字节数组的 base 64 编码字符串。

bannerImage

字典

热点门户的 bannerImage。

data

字符串

表示为图像字节数组的 base 64 编码字符串。

bannerTitle

字符串

热点门户的 bannerTitle。

contactText

字符串

热点门户的 contactText。

desktopLogoImage

字典

热点门户的 desktopLogoImage。

data

字符串

表示为图像字节数组的 base 64 编码字符串。

footerElement

字符串

热点门户的 footerElement。

mobileLogoImage

字典

热点门户的 mobileLogoImage。

data

字符串

表示为图像字节数组的 base 64 编码字符串。

language

字典

此属性仅支持读取操作,它允许以英语显示自定义项。不支持其他语言。

viewLanguage

字符串

热点门户的 viewLanguage。

pageCustomizations

字典

热点门户的 pageCustomizations。

data

列表 / 元素=字典

热点门户的数据。

key

字符串

热点门户的 key。

value

字符串

热点门户的 value。

portalTheme

字典

定义门户主题的配置。

id

字符串

门户主题的唯一内部标识符。

name

字符串

门户主题的系统或用户分配的名称。

themeData

字符串

一个 CSS 文件,表示为 Base64 编码的字节数组。

portalTweakSettings

字典

Tweak Settings 是对为门户选择的门户主题的自定义。当门户主题选择更改时,Tweak Settings 将被覆盖以匹配主题中的值。Tweak Settings 随后可以由用户更改。

bannerColor

字符串

颜色的十六进制值。

bannerTextColor

字符串

热点门户的 bannerTextColor。

pageBackgroundColor

字符串

热点门户的 pageBackgroundColor。

pageLabelAndTextColor

字符串

热点门户的 pageLabelAndTextColor。

description

字符串

热点门户的 description。

id

字符串

热点门户的 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

字符串

热点门户的名称。

portalTestUrl

字符串

用于启动此门户测试页面的 URL。

portalType

字符串

允许的值 - BYOD、- HOTSPOTGUEST、- MYDEVICE、- SELFREGGUEST、- SPONSOR、- SPONSOREDGUEST。

settings

字典

定义 BYOD 的所有可用设置组。

aupSettings

字典

门户的“可接受使用策略”(AUP)的配置。

accessCode

字符串

门户用户必须输入的访问代码(仅当 requireAccessCode = true 时有效)。

includeAup

布尔值

要求门户用户阅读并接受 AUP。

选择

  • false

  • true

requireAccessCode

布尔值

要求门户用户输入访问代码。仅在热点门户中使用。

选择

  • false

  • true

requireScrolling

布尔值

要求门户用户滚动到 AUP 的末尾。仅当 requireAupAcceptance = true 时有效。

选择

  • false

  • true

authSuccessSettings

字典

热点门户的 authSuccessSettings。

redirectUrl

字符串

重定向的目标 URL,当 successRedirect = URL 时使用。

successRedirect

字符串

身份验证成功后,设备应重定向到哪里。允许的值 - AUTHSUCCESSPAGE、- ORIGINATINGURL、- URL。

portalSettings

字典

门户的端口、接口、证书和其他基本设置。

allowedInterfaces

列表 / 元素=字符串

门户将在其上可访问的接口。允许的值 - eth0 - eth1 - eth2 - eth3 - eth4 - eth5 - bond0 - bond1 - bond2。

alwaysUsedLanguage

字符串

当 displayLang = ALWAYSUSE 时使用。

certificateGroupTag

字符串

将用于门户的 x.509 服务器证书的逻辑名称。

coaType

字符串

允许的值 - COAREAUTHENTICATE、- COATERMINATE。

displayLang

字符串

允许的值 - USEBROWSERLOCALE、- ALWAYSUSE。

endpointIdentityGroup

字符串

将添加用户设备的端点身份组的唯一 ID。仅在热点门户中使用。

fallbackLanguage

字符串

当 displayLang = USEBROWSERLOCALE 时使用。

httpsPort

整数

允许的接口将侦听的端口号。范围从 8000 到 8999。

postAccessBannerSettings

字典

热点门户的 postAccessBannerSettings。

includePostAccessBanner

布尔值

IncludePostAccessBanner 标志。

选择

  • false

  • true

postLoginBannerSettings

字典

热点门户的 postLoginBannerSettings。

includePostAccessBanner

布尔值

包含一个登录后横幅页面。

选择

  • false

  • true

supportInfoSettings

字典

门户支持信息设置。

defaultEmptyFieldValue

字符串

为空字段显示的默认值。仅当 emptyFieldDisplay = DISPLAYWITHDEFAULTVALUE 时有效。

emptyFieldDisplay

字符串

指定如何在“支持信息”页面上处理空字段。允许的值 - HIDE、- DISPLAYWITHNOVALUE、- DISPLAYWITHDEFAULTVALUE。

includeBrowserUserAgent

布尔值

IncludeBrowserUserAgent 标志。

选择

  • false

  • true

includeFailureCode

布尔值

IncludeFailureCode 标志。

选择

  • false

  • true

includeIpAddress

布尔值

IncludeIpAddress 标志。

选择

  • false

  • true

includeMacAddr

布尔值

IncludeMacAddr 标志。

选择

  • false

  • true

includePolicyServer

布尔值

IncludePolicyServer 标志。

选择

  • false

  • true

includeSupportInfoPage

布尔值

IncludeSupportInfoPage 标志。

选择

  • false

  • true

注释

注意

  • 使用的 SDK 方法是 hotspot_portal.HotspotPortal.create_hotspot_portal, hotspot_portal.HotspotPortal.delete_hotspot_portal_by_id, hotspot_portal.HotspotPortal.update_hotspot_portal_by_id,

  • 使用的路径是 post /ers/config/hotspotportal, delete /ers/config/hotspotportal/{id}, put /ers/config/hotspotportal/{id},

  • 不支持 check_mode

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

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

示例

- name: Update by id
  cisco.ise.hotspot_portal:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    customizations:
      globalCustomizations:
        backgroundImage:
          data: string
        bannerImage:
          data: string
        bannerTitle: string
        contactText: string
        desktopLogoImage:
          data: string
        footerElement: string
        mobileLogoImage:
          data: string
      language:
        viewLanguage: string
      pageCustomizations:
        data:
        - key: string
          value: string
      portalTheme:
        id: string
        name: string
        themeData: string
      portalTweakSettings:
        bannerColor: string
        bannerTextColor: string
        pageBackgroundColor: string
        pageLabelAndTextColor: string
    description: string
    id: string
    name: string
    portalTestUrl: string
    portalType: string
    settings:
      aupSettings:
        accessCode: string
        includeAup: true
        requireAccessCode: true
        requireScrolling: true
      authSuccessSettings:
        redirectUrl: string
        successRedirect: string
      portalSettings:
        allowedInterfaces:
        - string
        alwaysUsedLanguage: string
        certificateGroupTag: string
        coaType: string
        displayLang: string
        endpointIdentityGroup: string
        fallbackLanguage: string
        httpsPort: 0
      postAccessBannerSettings:
        includePostAccessBanner: true
      postLoginBannerSettings:
        includePostAccessBanner: true
      supportInfoSettings:
        defaultEmptyFieldValue: string
        emptyFieldDisplay: string
        includeBrowserUserAgent: true
        includeFailureCode: true
        includeIpAddress: true
        includeMacAddr: true
        includePolicyServer: true
        includeSupportInfoPage: true

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

- name: Create
  cisco.ise.hotspot_portal:
    ise_hostname: "{{ise_hostname}}"
    ise_username: "{{ise_username}}"
    ise_password: "{{ise_password}}"
    ise_verify: "{{ise_verify}}"
    state: present
    customizations:
      globalCustomizations:
        backgroundImage:
          data: string
        bannerImage:
          data: string
        bannerTitle: string
        contactText: string
        desktopLogoImage:
          data: string
        footerElement: string
        mobileLogoImage:
          data: string
      language:
        viewLanguage: string
      pageCustomizations:
        data:
        - key: string
          value: string
      portalTheme:
        id: string
        name: string
        themeData: string
      portalTweakSettings:
        bannerColor: string
        bannerTextColor: string
        pageBackgroundColor: string
        pageLabelAndTextColor: string
    description: string
    name: string
    portalTestUrl: string
    portalType: string
    settings:
      aupSettings:
        accessCode: string
        includeAup: true
        requireAccessCode: true
        requireScrolling: true
      authSuccessSettings:
        redirectUrl: string
        successRedirect: string
      portalSettings:
        allowedInterfaces:
        - string
        alwaysUsedLanguage: string
        certificateGroupTag: string
        coaType: string
        displayLang: string
        endpointIdentityGroup: string
        fallbackLanguage: string
        httpsPort: 0
      postAccessBannerSettings:
        includePostAccessBanner: true
      postLoginBannerSettings:
        includePostAccessBanner: true
      supportInfoSettings:
        defaultEmptyFieldValue: string
        emptyFieldDisplay: string
        includeBrowserUserAgent: true
        includeFailureCode: true
        includeIpAddress: true
        includeMacAddr: true
        includePolicyServer: true
        includeSupportInfoPage: true

返回值

通用返回值记录在此处,以下是此模块特有的字段

描述

ise_response

字典

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

返回: 总是

示例: {"customizations": {"globalCustomizations": {"backgroundImage": {"data": "string"}, "bannerImage": {"data": "string"}, "bannerTitle": "string", "contactText": "string", "desktopLogoImage": {"data": "string"}, "footerElement": "string", "mobileLogoImage": {"data": "string"}}, "language": {"viewLanguage": "string"}, "pageCustomizations": {"data": [{"key": "string", "value": "string"}]}, "portalTheme": {"id": "string", "name": "string", "themeData": "string"}, "portalTweakSettings": {"bannerColor": "string", "bannerTextColor": "string", "pageBackgroundColor": "string", "pageLabelAndTextColor": "string"}}, "description": "string", "id": "string", "link": {"href": "string", "rel": "string", "type": "string"}, "name": "string", "portalTestUrl": "string", "portalType": "string", "settings": {"aupSettings": {"accessCode": "string", "includeAup": true, "requireAccessCode": true, "requireScrolling": true}, "authSuccessSettings": {"redirectUrl": "string", "successRedirect": "string"}, "portalSettings": {"allowedInterfaces": ["string"], "alwaysUsedLanguage": "string", "certificateGroupTag": "string", "coaType": "string", "displayLang": "string", "endpointIdentityGroup": "string", "fallbackLanguage": "string", "httpsPort": 0}, "postAccessBannerSettings": {"includePostAccessBanner": true}, "postLoginBannerSettings": {"includePostAccessBanner": true}, "supportInfoSettings": {"defaultEmptyFieldValue": "string", "emptyFieldDisplay": "string", "includeBrowserUserAgent": true, "includeFailureCode": true, "includeIpAddress": true, "includeMacAddr": true, "includePolicyServer": true, "includeSupportInfoPage": true}}}

ise_update_response

字典

在 cisco.ise 1.1.0 中添加

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

返回: 总是

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

作者

  • Rafael Campos (@racampos)