drmofu / drmofu.fortiflexvm / 1.0.1 / module / fortiflexvm_vms_create Create one or more VMs based on a FlexVM Configuration. | "added in version" 1.0.0 of drmofu.fortiflexvm" Authors: Xinwei Du (@DrMofu)drmofu.fortiflexvm.fortiflexvm_vms_create (1.0.1) — module
Install with ansible-galaxy collection install drmofu.fortiflexvm:==1.0.1
collections: - name: drmofu.fortiflexvm version: 1.0.1
Create one or more VMs based on a FlexVM Configuration.
This API is only used to create one or more VMs. To modify a VM, please refer to fortiflexvm_vms_update.
- name: Create VMs hosts: localhost collections: - drmofu.fortiflexvm vars: username: "<your_own_value>" password: "<your_own_value>" tasks: - name: Create Virtual Machines drmofu.fortiflexvm.fortiflexvm_vms_create: username: "{{ username }}" password: "{{ password }}" configId: 42 count: 1 description: "Create through Ansible" endDate: "2023-11-11T00:00:00" folderPath: "My Assets" register: result - name: Display response debug: var: result.vms
count: default: 1 description: - The number of VM(s) to be created. The default value is 1. required: false type: int endDate: description: - VM(s) end date. It can not be before today's date or after the program's end date. - 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 a Flex VM Configuration. required: true 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: - The folder path of the VM(s). required: false type: str description: description: - The description of VM(s). required: false type: str
vms: contains: configId: description: The ID of the virtual machine configuration. returned: always sample: 42 type: int description: description: The description of the virtual machine. returned: always sample: Create through Ansible type: str endDate: description: The end date of the virtual machine's validity. returned: always sample: '2023-11-11T00:00:00' type: str serialNumber: description: The serial number of the virtual machine. returned: always sample: FGVMMLTM23002016 type: str startDate: description: The start date of the virtual machine's validity. returned: always sample: '2023-04-06T15:49:29.643' type: str status: description: The status of the virtual machine. returned: always sample: PENDING type: str token: description: The token assigned to the virtual machine. returned: always type: str tokenStatus: description: The status of the token assigned to the virtual machine. returned: always sample: NOTUSED type: str description: A list of virtual machines and their details. returned: always type: list