fortiflexvm_entitlements_vm_regenerate_token - Regenerate token for a VM.

Added in version 2.0.0.

Synopsis

Regenerate token for a VM.

Requirements

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

  • ansible>=2.15

Parameters

  • username The username to authenticate. If not declared, the code will read the environment variable FORTIFLEX_ACCESS_USERNAME.type: str
  • password The password to authenticate. If not declared, the code will read the environment variable FORTIFLEX_ACCESS_PASSWORD.type: str
  • regenerate Whether regenerate a new token.type: boolrequired: True
  • serialNumber The serial number of the entitlement to update.type: strrequired: True

Examples

- name: Regenerate token
  hosts: localhost
  vars:
    username: "<your_own_value>"
    password: "<your_own_value>"
  tasks:
    - name: Regenerate token
      fortinet.fortiflexvm.fortiflexvm_entitlements_vm_regenerate_token:
        username: "{{ username }}"
        password: "{{ password }}"
        serialNumber: "FGVMMLTM00000000"
        regenerate: true # If you set it as false, FortiFlexvm ansible collection will return an empty list.
      register: result

    - name: Display response
      ansible.builtin.debug:
        var: result.entitlements

Return Values

  • entitlements The entitlement you update. This list only contains one entitlement. It will be empty if you set regenerate as false.type: listreturned: always
    • accountId Account ID.type: intreturned: always
    • configId The config ID of the entitlement.type: intreturned: always
    • description The description of the entitlement.type: strreturned: always
    • endDate The end date of the entitlement.type: strreturned: always
    • serialNumber The serial number of the entitlement.type: strreturned: always
    • startDate The start date of the entitlement.type: strreturned: always
    • status The status of the VM. Possible values are "PENDING", "ACTIVE", "STOPPED" or "EXPIRED".type: strreturned: always
    • token The token of the entitlement.type: strreturned: always
    • tokenStatus The token status of the entitlement. Possible values are "NOTUSED" or "USED".type: strreturned: always

Authors

  • Xinwei Du (@dux-fortinet)

Hint

If you notice any issues in this documentation, you can create a pull request to improve it.