fortinet / fortinet.fortiflexvm / 1.0.0 / module / fortiflexvm_vms_update Update an existing VM. | "added in version" 1.0.0 of fortinet.fortiflexvm" Authors: Xinwei Du (@DrMofu)fortinet.fortiflexvm.fortiflexvm_vms_update (1.0.0) — module
Install with ansible-galaxy collection install fortinet.fortiflexvm:==1.0.0
collections: - name: fortinet.fortiflexvm version: 1.0.0
This module updates an existing virtual machine.
- name: Update VM hosts: localhost collections: - fortinet.fortiflexvm vars: username: "<your_own_value>" password: "<your_own_value>" tasks: - name: Update a Virtual Machine fortinet.fortiflexvm.fortiflexvm_vms_update: username: "{{ username }}" password: "{{ password }}" serialNumber: "FGVMMLTM23001324" # Please specify configId if you want to update configId, description or endDate configId: 3196 description: "Modify through Ansible" endDate: "2023-12-12T00:00:00" status: "ACTIVE" # ACTIVE or STOPPED regenerateToken: False register: result - name: Display response debug: var: result.vms
status: choices: - ACTIVE - STOPPED description: - The status of the virtual machine. required: false type: str endDate: description: - The end date of the virtual machine's validity. - Any format that satisfies [ISO 8601](https://www.w3.org/TR/NOTE-datetime-970915.html) is accepted. - Recommended format is "YYYY-MM-DDThh:mm:ss". required: false type: str configId: description: - The ID of the virtual machine configuration. 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 description: description: - The description of the virtual machine. required: false type: str serialNumber: description: - The serial number of the virtual machine to update. required: true type: str regenerateToken: default: false description: - Whether to regenerate the token assigned to the virtual machine. required: false type: bool
vms: contains: configId: description: The config ID of the VM. returned: always sample: 3196 type: int description: description: The description of the VM. returned: always sample: Modify through Ansible type: str endDate: description: The end date of the VM. returned: always sample: '2023-12-12T00:00:00' type: str serialNumber: description: The serial number of the VM. returned: always sample: FGVMMLTM23001324 type: str startDate: description: The start date of the VM. 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 VM. returned: always type: str tokenStatus: description: The token status of the VM. Possible values are "NOTUSED" or "USED". returned: always sample: NOTUSED type: str description: The VM you update. This list only contains one VM. returned: always type: list