scale_computing.hypercore.vm_params module – Manage VM’s parameters
Note
This module is part of the scale_computing.hypercore collection (version 1.1.0).
To install it, use: ansible-galaxy collection install scale_computing.hypercore.
To use it in a playbook, specify: scale_computing.hypercore.vm_params.
New in scale_computing.hypercore 1.0.0
Synopsis
Use vm_params to update VM’s name, description, tags, memory, number of CPUs or change VM’s power state.
Can also be used to assign a snapshot schedule to the VM.
Parameters
Parameter |
Comments |
|---|---|
Scale Computing HyperCore instance information. |
|
The HyperCore instance URL. If not set, the value of the For example “https://10.1.2.3:443”. |
|
Password used for authentication. If not set, the value of the |
|
Timeout in seconds for the connection with the Scale Computing HyperCore API instance. If not set, the value of the |
|
Username used for authentication. If not set, the value of the |
|
VM’s description. |
|
Can VM be forced to power off and on. Only used when modifications to the VM require it to be powered off and VM does not respond to a shutdown request within shutdown_timeout limit. Before this is utilized, a shutdown request is sent. Choices:
|
|
Amount of memory reserved, in bytes. May only be modified if VM is in |
|
Operating system name. Used to select drivers package Choices:
|
|
Desired VM state. States Choices:
|
|
How long does ansible controller wait for VMs response to a shutdown request. In seconds. Default: |
|
The name of an existing snapshot_schedule to assign to VM. VM can have 0 or 1 snapshot schedules assigned. |
|
User-modifiable words for organizing a group of VMs. Multiple tags should be provided as list. All existing tags will be overwritten, so group tag should always be included. |
|
Number of allotted virtual CPUs. May only be modified if VM is in |
|
Virtual machine name. Used to identify selected virtual machine by name. |
|
VM’s new name. |
Notes
Note
check_modeis not supported.
Examples
- name: Set VM simple params
scale_computing.hypercore.vm_params:
vm_name: demo-vm
vm_name_new: renamed-vm
description: test vm params
force_reboot: true
shutdown_timeout: "{{ '5minutes' | community.general.to_time_unit('seconds') }}"
tags:
- Group-name
- tag1
- tag2
memory: "{{ '512 MB' | human_to_bytes }}"
vcpu: 2
power_state: shutdown
snapshot_schedule: demo-snap-schedule
- name: Delete description, tags and snapshot_schedule
scale_computing.hypercore.vm_params:
vm_name: demo-vm
description: ""
tags: [""]
snapshot_schedule: ""
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Info if reboot of the VM was performed. Returned: success Sample: |