drmofu.fortiflexvm.fortiflexvm_groups_nexttoken_info (2.0.0) — module

Get net available (unused) token.

| "added in version" 1.0.0 of drmofu.fortiflexvm"

Authors: Xinwei Du (@DrMofu)

Install collection

Install with ansible-galaxy collection install drmofu.fortiflexvm:==2.0.0


Add to requirements.yml

  collections:
    - name: drmofu.fortiflexvm
      version: 2.0.0

Description

Returns first available token by asset folder or Configuration id (folder path, or config id or both can be specified in request).

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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.entitlements

Inputs

    
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 FORTIFLEX_ACCESS_PASSWORD.
    required: false
    type: str

username:
    description:
    - The username to authenticate. If not declared, the code will read the environment
      variable FORTIFLEX_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

Outputs

entitlements:
  contains:
    configId:
      description: The config ID of the entitlement.
      returned: always
      sample: 22
      type: int
    description:
      description: The description of the entitlement.
      returned: always
      sample: VMs created for department A
      type: str
    endDate:
      description: The end date of the entitlement.
      returned: always
      sample: '2020-10-25 00:00:00'
      type: str
    serialNumber:
      description: The serial number of the entitlement.
      returned: always
      sample: FGVMELTM20000020
      type: str
    startDate:
      description: The start date of the entitlement.
      returned: always
      sample: '2020-08-01 10:12:25'
      type: str
    status:
      description: The status of the entitlement. Possible values are "PENDING", "ACTIVE",
        "STOPPED" or "EXPIRED".
      returned: always
      sample: ACTIVE
      type: str
    token:
      description: The token of the entitlement.
      returned: always
      type: str
    tokenStatus:
      description: The token status of the entitlement.
      returned: always
      sample: NOTUSED
      type: str
  description: Next available (unused) token. This list only has one element.
  returned: always
  type: list