fortinet / fortinet.fortiflexvm / 2.2.0 / module / fortiflexvm_entitlements_vm_regenerate_token Regenerate token for a VM. | "added in version" 2.0.0 of fortinet.fortiflexvm" Authors: Xinwei Du (@dux-fortinet)fortinet.fortiflexvm.fortiflexvm_entitlements_vm_regenerate_token (2.2.0) — module
Install with ansible-galaxy collection install fortinet.fortiflexvm:==2.2.0
collections: - name: fortinet.fortiflexvm version: 2.2.0
Regenerate token for a VM.
- 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: "FGVMMLTM23001324" 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
password: description: - The password to authenticate. If not declared, the code will read the environment variable FORTIFLEX_ACCESS_PASSWORD. type: str username: description: - The username to authenticate. If not declared, the code will read the environment variable FORTIFLEX_ACCESS_USERNAME. type: str regenerate: description: - Whether regenerate a new token. required: true type: bool serialNumber: description: - The serial number of the entitlement to update. required: true type: str
entitlements: contains: accountId: description: Account ID. returned: always sample: 12345 type: int configId: description: The config ID of the entitlement. returned: always sample: 3196 type: int description: description: The description of the entitlement. returned: always sample: Modify through Ansible type: str endDate: description: The end date of the entitlement. returned: always sample: '2023-12-12T00:00:00' type: str serialNumber: description: The serial number of the entitlement. returned: always sample: FGVMMLTM23001324 type: str startDate: description: The start date of the entitlement. returned: always sample: '2023-03-13T11:48:53.03' 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 entitlement. returned: always type: str tokenStatus: description: The token status of the entitlement. Possible values are "NOTUSED" or "USED". returned: always sample: NOTUSED type: str description: The entitlement you update. This list only contains one entitlement. It will be empty if you set regenerate as false. returned: always type: list