zscaler.ziacloud.zia_browser_control_supported_versions_info module – Gets the supported browsers and their versions

Note

This module is part of the zscaler.ziacloud collection (version 2.2.3).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install zscaler.ziacloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: zscaler.ziacloud.zia_browser_control_supported_versions_info.

New in zscaler.ziacloud 2.1.0

Synopsis

  • Retrieves the list of all supported browsers and their versions for the Browser Control policy.

  • The API returns a flat list with no server-side filtering, so all filtering is performed locally by this module.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter

Comments

api_key

string

A string that contains the obfuscated API key.

browser_type

string

Return only the entry matching a specific browser type.

If not set, all supported browsers are returned.

Choices:

  • "OPERA"

  • "FIREFOX"

  • "MSIE"

  • "MSEDGE"

  • "CHROME"

  • "SAFARI"

  • "OTHER"

  • "MSCHREDGE"

client_id

string

The client ID for OAuth2 authentication.

client_secret

string

The client secret for OAuth2 authentication.

cloud

string

The Zscaler cloud name provisioned for your organization.

Choices:

  • "beta"

  • "production"

  • "zscaler"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerone"

  • "zscalerten"

  • "zscalerthree"

  • "zscalertwo"

  • "zscloud"

  • "zspreview"

older_versions

list / elements=string

Return only browser entries whose older_versions list contains at least one of the supplied values.

The returned older_versions list is narrowed to only the matched values, and versions is returned empty unless also searched.

password

string

A string that contains the password for the API admin.

private_key

string

The private key for JWT-based OAuth2 authentication.

provider

dictionary

A dict containing authentication credentials.

api_key

string

Obfuscated API key.

client_id

string

OAuth2 client ID.

client_secret

string

OAuth2 client secret.

cloud

string

Zscaler cloud name.

Choices:

  • "beta"

  • "production"

  • "zscaler"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerone"

  • "zscalerten"

  • "zscalerthree"

  • "zscalertwo"

  • "zscloud"

  • "zspreview"

password

string

Password for the API admin.

private_key

string

Private key for OAuth2 JWT.

sandbox_cloud

string

Sandbox Cloud environment.

sandbox_token

string

Sandbox API Key.

use_legacy_client

boolean

Whether to use the legacy Zscaler API client.

Choices:

  • false ← (default)

  • true

username

string

Email ID of the API admin.

vanity_domain

string

Vanity domain for OAuth2.

query

string

An optional JMESPath expression applied locally to the (already filtered) list of browser entries.

Use this for advanced filtering/projection that the simple key filters cannot express.

See https://jmespath.org/ for the expression syntax.

Each entry exposes the keys browser_type, versions and older_versions.

sandbox_cloud

string

The Sandbox cloud environment for API access.

sandbox_token

string

A string that contains the Sandbox API Key.

use_legacy_client

boolean

Whether to use the legacy Zscaler API client.

Choices:

  • false ← (default)

  • true

username

string

A string that contains the email ID of the API admin.

vanity_domain

string

The vanity domain provisioned by Zscaler for OAuth2 flows.

versions

list / elements=string

Return only browser entries whose versions list contains at least one of the supplied values.

The returned versions list is narrowed to only the matched values, and older_versions is returned empty unless also searched.

Notes

Note

  • Check mode is supported.

  • All filters are applied client-side after retrieving the full list.

  • When versions or older_versions is set, matching entries are returned with their versions and older_versions lists narrowed to ONLY the requested tokens, so the output stays focused on what was searched. A field that was not searched is returned empty.

  • When multiple of browser_type, versions and older_versions are set, they are combined with logical AND.

  • query (JMESPath) is applied last, to the already filtered list.

Examples

- name: Get all supported browsers and their versions
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'

- name: Get supported versions for a specific browser type
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    browser_type: CHROME

# Returns the matching entries with `versions` narrowed to only the searched
# tokens, e.g. [{browser_type: CHROME, versions: [CH143], older_versions: []},
#               {browser_type: FIREFOX, versions: [MF145], older_versions: []}]
- name: Find which browsers support specific current versions (focused output)
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    versions:
      - CH143
      - MF145

# Returns e.g. [{browser_type: CHROME, versions: [], older_versions: [CH100]}]
- name: Find which browsers list a specific older version (focused output)
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    older_versions:
      - CH100

- name: Combine simple filters (CHROME entry that also has version CH143)
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    browser_type: CHROME
    versions:
      - CH143

# --- Advanced local filtering with JMESPath (query is applied last) ---
# Note: a trailing field selector (e.g. ".browser_type") is a JMESPath
# projection and returns ONLY that field. Omit it to return full entries.

- name: Return the full browser entries that currently support version CH143
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    query: "[?contains(versions, 'CH143')]"

- name: Return ONLY the browser type names that support version CH143
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    query: "[?contains(versions, 'CH143')].browser_type"

- name: Project a flat list of browser_type with just its current versions
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    query: "[].{type: browser_type, current: versions}"

- name: Get the full entry for a single browser type via JMESPath
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    query: "[?browser_type=='FIREFOX'] | [0]"

- name: Find browser types that still list any older versions
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    query: "[?length(older_versions) > `0`].browser_type"

# --- Using the result in a playbook ---

- name: Retrieve Chrome supported versions and reuse them
  zscaler.ziacloud.zia_browser_control_supported_versions_info:
    provider: '{{ provider }}'
    browser_type: CHROME
  register: chrome_versions

- name: Show the current Chrome versions
  ansible.builtin.debug:
    msg: "{{ chrome_versions.browsers[0].versions }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

browsers

list / elements=dictionary

A list of supported browsers and their versions, after any local filtering.

Returned: always

browser_type

string

The browser type.

Returned: success

Sample: "CHROME"

older_versions

list / elements=string

Earlier versions of the browser.

Returned: success

versions

list / elements=string

The current versions of the browser.

Returned: success

Authors

  • William Guilherme (@willguibr)