fortinet / fortinet.fortiflexvm / 1.0.0 / module / fortiflexvm_groups_nexttoken_info Get net available (unused) token. | "added in version" 1.0.0 of fortinet.fortiflexvm" Authors: Xinwei Du (@DrMofu)fortinet.fortiflexvm.fortiflexvm_groups_nexttoken_info (1.0.0) — module
Install with ansible-galaxy collection install fortinet.fortiflexvm:==1.0.0
collections: - name: fortinet.fortiflexvm version: 1.0.0
Returns first available token by asset folder or Configuration id (folder path, or config id or both can be specified in request).
- 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
configId: description: - The ID of a Flex VM Configuration. Please declare at least one of the two arguments folderPath and configId. required: false type: int password: description: - The password to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_PASSWORD. required: false type: str username: description: - The username to authenticate. If not declared, the code will read the environment variable FLEXVM_ACCESS_USERNAME. required: false type: str folderPath: description: - Folder path. Please declare at least one of the two arguments folderPath and configId. required: false type: str
vms: contains: configId: description: The config ID of the VM. returned: always sample: 22 type: int description: description: The description of the VM. returned: always sample: VMs created for department A type: str endDate: description: The end date of the VM. returned: always sample: '2020-10-25 00:00:00' type: str serialNumber: description: The serial number of the VM. returned: always sample: FGVMELTM20000020 type: str startDate: description: The start date of the VM. returned: always sample: '2020-08-01 10:12:25' type: str status: description: The status of the VM. Possible values are "PENDING", "ACTIVE", "STOPPED" or "EXPIRED". returned: always sample: ACTIVE type: str token: description: The token of the VM. returned: always type: str tokenStatus: description: The token status of the VM. returned: always sample: NOTUSED type: str description: Next available (unused) token. This list only has one element. returned: always type: list