Get the next available tokens
Use the fortiflexvm_groups_nexttoken_info
to get the first available token by asset folder and configuration ID.
Parameters
The following parameters are included:
Parameter |
Type |
Description |
---|---|---|
|
String (Optional) |
The username to authenticate. If not declared, the code will read the environment variable |
password
|
String (Optional) |
The password to authenticate. If not declared, the code will read the environment variable |
|
String (Optional) |
The folder path. |
|
Integer (Optional) |
The ID of the FortiFlex configuration. |
|
String |
The status of the VM; either |
You must declare at least one of the |
Example
The following is an example use of this module:
- name: Get next available (unused) token hosts: localhost collections: - fortinet.fortiflexvm vars: username: "<your_own_value>" password: "<your_own_value>" tasks: - name: Get groups nexttoken fortinet.fortiflexvm.fortiflexvm_groups_nexttoken_info: username: "{{ username }}" password: "{{ password }}" # Please declare at least one of the following two arguments: folderPath and configId. # You can annotate at most one argument that you don't want to specify. folderPath: "My Assets" configId: 22 register: result - name: Display response debug: var: result.vms
Return values
The following parameters are returned:
Parameter |
Type Returned |
Description |
---|---|---|
|
List |
The next available, unused token. This list only has one element. |
The vms
list includes:
Parameter |
Type Returned |
Description |
---|---|---|
|
Integer |
The configuration ID of the VM. |
|
String |
The description of the VM. |
|
String |
The end date of the VM. |
|
String |
The serial number of the VM. |
|
String |
The start date of the VM. |
|
String |
The status of the VM; either |
|
String |
The token of the VM. |
|
String |
The token status of the VM. |