Fortinet black logo

Administration Guide

Get a list of FortiFlex groups

Get a list of FortiFlex groups

Use the fortiflexvm_groups_list_info module to get a list of FortiFlex groups (asset folders that have FortiFlex products in them).

Parameters

The following parameters are included:

Parameter

Type

Description

username

String (Optional)

The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME.

password

String (Optional)

The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD.

Example

The following is an example use of this module:

- name: Get list of FlexVM groups
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Get groups list
      fortinet.fortiflexvm.fortiflexvm_groups_list_info:
        username: "{{ username }}"
        password: "{{ password }}"
      register: result

    - name: Display response
      debug:
        var: result.groups

Return values

The following parameters are returned:

Parameter

Type Returned

Description

groups

List

The list of groups associated with the specified user.

The groups list includes:

Parameter

Type Returned

Description

folderPath

String

The folder path of the FortiFlex group.

availableTokens

Integer

The number of available tokens for the FortiFlex group.

usedTokens

Integer

The number of used tokens for the FortiFlex group.

Get a list of FortiFlex groups

Use the fortiflexvm_groups_list_info module to get a list of FortiFlex groups (asset folders that have FortiFlex products in them).

Parameters

The following parameters are included:

Parameter

Type

Description

username

String (Optional)

The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME.

password

String (Optional)

The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD.

Example

The following is an example use of this module:

- name: Get list of FlexVM groups
  hosts: localhost
  collections:
    - fortinet.fortiflexvm
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Get groups list
      fortinet.fortiflexvm.fortiflexvm_groups_list_info:
        username: "{{ username }}"
        password: "{{ password }}"
      register: result

    - name: Display response
      debug:
        var: result.groups

Return values

The following parameters are returned:

Parameter

Type Returned

Description

groups

List

The list of groups associated with the specified user.

The groups list includes:

Parameter

Type Returned

Description

folderPath

String

The folder path of the FortiFlex group.

availableTokens

Integer

The number of available tokens for the FortiFlex group.

usedTokens

Integer

The number of used tokens for the FortiFlex group.