cisco.ise.sponsor_portal 模块 – 赞助商门户的资源模块

注意

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

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

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

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

cisco.ise 1.0.0 中的新增功能

概要

  • 管理资源赞助商门户的创建、更新和删除操作。

  • 此 API 创建一个赞助商门户。

  • 此 API 按 ID 删除赞助商门户。

  • 此 API 允许客户端按 ID 更新赞助商门户。

注意

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

要求

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

  • ciscoisesdk >= 2.2.3

  • python >= 3.5

参数

参数

注释

customizations

字典

赞助商门户的自定义设置。

globalCustomizations

字典

赞助商门户的全局自定义设置。

backgroundImage

字典

赞助商门户的背景图片。

data

字符串

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

bannerImage

字典

赞助商门户的横幅图片。

data

字符串

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

bannerTitle

字符串

赞助商门户的横幅标题。

contactText

字符串

赞助商门户的联系人文本。

desktopLogoImage

字典

赞助商门户的桌面徽标图片。

data

字符串

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

footerElement

字符串

赞助商门户的页脚元素。

mobileLogoImage

字典

赞助商门户的移动徽标图片。

data

字符串

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

language

字典

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

viewLanguage

字符串

赞助商门户的视图语言。

pageCustomizations

字典

赞助商门户的页面自定义设置。

data

列表 / 元素=字典

字典将在此处作为键值对公开。

key

字符串

赞助商门户的键。

value

字符串

赞助商门户的值。

portalTheme

字典

赞助商门户的门户主题。

id

字符串

赞助商门户的 ID。

name

字符串

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

themeData

字符串

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

portalTweakSettings

字典

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

bannerColor

字符串

颜色的十六进制值。

bannerTextColor

字符串

赞助商门户的横幅文本颜色。

pageBackgroundColor

字符串

赞助商门户的页面背景颜色。

pageLabelAndTextColor

字符串

赞助商门户的页面标签和文本颜色。

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

字典

定义门户的所有可用设置组。

aupSettings

字典

赞助商门户的 aupSettings。

displayFrequency

字符串

AUP 的显示方式,在页面上或作为链接。仅当 includeAup = true 时有效。允许的值 - FIRSTLOGIN、- EVERYLOGIN、- RECURRING。

displayFrequencyIntervalDays

整数

两次 AUP 确认之间的天数(当 displayFrequency = recurring 时)。

includeAup

布尔值

IncludeAup 标志。

选项

  • false

  • true

requireScrolling

布尔值

RequireScrolling 标志。

选项

  • false

  • true

loginPageSettings

字典

门户登录页面设置组如下。

aupDisplay

字符串

AUP(可接受使用策略)的显示方式,可以是页面显示或链接显示。仅当 includeAup = true 时有效。允许的值 - ONPAGE, - ASLINK。

includeAup

布尔值

包含一个在登录期间应显示的可接受使用策略 (AUP)。

选项

  • false

  • true

maxFailedAttemptsBeforeRateLimit

整数

在进行速率限制之前允许的最大登录失败尝试次数。

requireAupAcceptance

布尔值

要求门户用户接受 AUP。仅当 includeAup = true 时有效。

选项

  • false

  • true

requireAupScrolling

布尔值

RequireAupScrolling 标志。

选项

  • false

  • true

socialConfigs

列表 / 元素=字典

赞助商门户的 socialConfigs。

timeBetweenLoginsDuringRateLimit

整数

进行速率限制时,登录尝试之间的间隔时间。

portalSettings

字典

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

allowedInterfaces

list / elements=string

门户可以访问的接口。允许的值 - eth0, - eth1, - eth2, - eth3, - eth4, - eth5, - bond0, - bond1, - bond2。

authenticationMethod

字符串

身份源序列的唯一 ID。

availableSSIDs

list / elements=string

可供赞助商分配给访客用户的 SSID 名称。

certificateGroupTag

字符串

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

displayLang

字符串

允许的值 - USEBROWSERLOCALE, - ALWAYSUSE。

fallbackLanguage

字符串

当 displayLang = USEBROWSERLOCALE 时使用。

fqdn

字符串

最终用户将用于访问此门户的完全限定域名 (FQDN)。仅在赞助商门户中使用。

httpsPort

整数

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

idleTimeout

整数

赞助商门户的 idleTimeout。

postAccessBannerSettings

字典

赞助商门户的 postAccessBannerSettings。

includePostAccessBanner

布尔值

IncludePostAccessBanner 标志。

选项

  • false

  • true

postLoginBannerSettings

字典

赞助商门户的 postLoginBannerSettings。

includePostAccessBanner

布尔值

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

选项

  • false

  • true

sponsorChangePasswordSettings

字典

赞助商门户的 sponsorChangePasswordSettings。

allowSponsorToChangePwd

布尔值

允许赞助商更改自己的密码。

选项

  • false

  • true

supportInfoSettings

字典

赞助商门户的 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 方法是 sponsor_portal.SponsorPortal.create_sponsor_portal, sponsor_portal.SponsorPortal.delete_sponsor_portal_by_id, sponsor_portal.SponsorPortal.update_sponsor_portal_by_id,

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

  • 不支持 check_mode

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

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

示例

- name: Update by id
  cisco.ise.sponsor_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:
        displayFrequency: string
        displayFrequencyIntervalDays: 0
        includeAup: true
        requireScrolling: true
      loginPageSettings:
        aupDisplay: string
        includeAup: true
        maxFailedAttemptsBeforeRateLimit: 0
        requireAupAcceptance: true
        requireAupScrolling: true
        socialConfigs:
        - {}
        timeBetweenLoginsDuringRateLimit: 0
      portalSettings:
        allowedInterfaces:
        - string
        authenticationMethod: string
        availableSsids:
        - string
        certificateGroupTag: string
        displayLang: string
        fallbackLanguage: string
        fqdn: string
        httpsPort: 0
        idleTimeout: 0
      postAccessBannerSettings:
        includePostAccessBanner: true
      postLoginBannerSettings:
        includePostAccessBanner: true
      sponsorChangePasswordSettings:
        allowSponsorToChangePwd: true
      supportInfoSettings:
        defaultEmptyFieldValue: string
        emptyFieldDisplay: string
        includeBrowserUserAgent: true
        includeFailureCode: true
        includeIpAddress: true
        includeMacAddr: true
        includePolicyServer: true
        includeSupportInfoPage: true

- name: Delete by id
  cisco.ise.sponsor_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.sponsor_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:
        displayFrequency: string
        displayFrequencyIntervalDays: 0
        includeAup: true
        requireScrolling: true
      loginPageSettings:
        aupDisplay: string
        includeAup: true
        maxFailedAttemptsBeforeRateLimit: 0
        requireAupAcceptance: true
        requireAupScrolling: true
        socialConfigs:
        - {}
        timeBetweenLoginsDuringRateLimit: 0
      portalSettings:
        allowedInterfaces:
        - string
        authenticationMethod: string
        availableSsids:
        - string
        certificateGroupTag: string
        displayLang: string
        fallbackLanguage: string
        fqdn: string
        httpsPort: 0
        idleTimeout: 0
      postAccessBannerSettings:
        includePostAccessBanner: true
      postLoginBannerSettings:
        includePostAccessBanner: true
      sponsorChangePasswordSettings:
        allowSponsorToChangePwd: 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": {"displayFrequency": "string", "displayFrequencyIntervalDays": 0, "includeAup": true, "requireScrolling": true}, "loginPageSettings": {"aupDisplay": "string", "includeAup": true, "maxFailedAttemptsBeforeRateLimit": 0, "requireAupAcceptance": true, "requireAupScrolling": true, "socialConfigs": [{}], "timeBetweenLoginsDuringRateLimit": 0}, "portalSettings": {"allowedInterfaces": ["string"], "authenticationMethod": "string", "availableSsids": ["string"], "certificateGroupTag": "string", "displayLang": "string", "fallbackLanguage": "string", "fqdn": "string", "httpsPort": 0, "idleTimeout": 0}, "postAccessBannerSettings": {"includePostAccessBanner": true}, "postLoginBannerSettings": {"includePostAccessBanner": true}, "sponsorChangePasswordSettings": {"allowSponsorToChangePwd": 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)