community.general.hwc_evs_disk module – Creates a resource of Evs/Disk in Huawei Cloud
Note
This module is part of the community.general collection (version 10.0.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.hwc_evs_disk
.
New in community.general 0.2.0
Synopsis
block storage management.
Requirements
The below requirements are needed on the host that executes this module.
keystoneauth1 >= 3.6.0
Parameters
Parameter |
Comments |
---|---|
Specifies the AZ where you want to create the disk. |
|
Specifies the ID of the backup that can be used to create a disk. This parameter is mandatory when you use a backup to create the disk. |
|
Specifies the disk description. The value can contain a maximum of 255 bytes. |
|
The name of the Domain to scope to (Identity v3). Currently only domain names are supported, and not domain IDs. |
|
If the disk is created from a snapshot and linked cloning needs to be used, set this parameter to True. Choices:
|
|
If this parameter is set to True, the disk device type will be SCSI, which allows ECS OSs to directly access underlying storage media. SCSI reservation command is supported. If this parameter is set to False, the disk device type will be VBD, which supports only simple SCSI read/write commands. If parameter enable_share is set to True and this parameter is not specified, shared SCSI disks are created. SCSI EVS disks cannot be created from backups, which means that this parameter cannot be True if backup_id has been specified. Choices:
|
|
Specifies whether the disk is shareable. The default value is False. Choices:
|
|
Specifies the encryption ID. The length of it fixes at 36 bytes. |
|
Specifies the enterprise project ID. This ID is associated with the disk during the disk creation. If it is not specified, the disk is bound to the default enterprise project. |
|
The ID of resource to be managed. |
|
The Identity authentication URL. |
|
Specifies the image ID. If this parameter is specified, the disk is created from an image. BMS system disks cannot be created from BMS images. |
|
Specifies the disk name. The value can contain a maximum of 255 bytes. |
|
The password to login with. |
|
The name of the Tenant (Identity v2) or Project (Identity v3). Currently only project names are supported, and not project IDs. |
|
The region to which the project belongs. |
|
Specifies the disk size, in GB. Its values are as follows, System disk 1 GB to 1024 GB, Data disk 10 GB to 32768 GB. This parameter is mandatory when you create an empty disk or use an image or a snapshot to create a disk. If you use an image or a snapshot to create a disk, the disk size must be greater than or equal to the image or snapshot size. This parameter is optional when you use a backup to create a disk. If this parameter is not specified, the disk size is equal to the backup size. |
|
Specifies the snapshot ID. If this parameter is specified, the disk is created from a snapshot. |
|
Whether the given object should exist in Huaweicloud Cloud. Choices:
|
|
The timeouts for each operations. Default: |
|
The timeouts for create operation. Default: |
|
The timeouts for delete operation. Default: |
|
The timeouts for update operation. Default: |
|
The user name to login with. Currently only user names are supported, and not user IDs. |
|
Specifies the disk type. Currently, the value can be SSD, SAS, or SATA. SSD specifies the ultra-high I/O disk type. SAS specifies the high I/O disk type. SATA specifies the common I/O disk type. If the specified disk type is not available in the AZ, the disk will fail to create. If the EVS disk is created from a snapshot, the volume_type field must be the same as that of the snapshot’s source disk. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
For authentication, you can set identity_endpoint using the
ANSIBLE_HWC_IDENTITY_ENDPOINT
environment variable.For authentication, you can set user using the
ANSIBLE_HWC_USER
environment variable.For authentication, you can set password using the
ANSIBLE_HWC_PASSWORD
environment variable.For authentication, you can set domain using the
ANSIBLE_HWC_DOMAIN
environment variable.For authentication, you can set project using the
ANSIBLE_HWC_PROJECT
environment variable.For authentication, you can set region using the
ANSIBLE_HWC_REGION
environment variable.Environment variables values will only be used if the playbook values are not set.
Examples
# test create disk
- name: Create a disk
community.general.hwc_evs_disk:
availability_zone: "cn-north-1a"
name: "ansible_evs_disk_test"
volume_type: "SATA"
size: 10
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Specifies the disk attachment information. Returned: success |
|
Specifies the time when the disk was attached. Time format is ‘UTC YYYY-MM-DDTHH:MM:SS’. Returned: success |
|
Specifies the ID of the attachment information. Returned: success |
|
Specifies the device name. Returned: success |
|
Specifies the ID of the server to which the disk is attached. Returned: success |
|
Specifies the AZ where you want to create the disk. Returned: success |
|
Specifies the ID of the backup that can be used to create a disk. This parameter is mandatory when you use a backup to create the disk. Returned: success |
|
Specifies the backup policy ID. Returned: success |
|
Specifies the time when the disk was created. Time format is ‘UTC YYYY-MM-DDTHH:MM:SS’. Returned: success |
|
Specifies the disk description. The value can contain a maximum of 255 bytes. Returned: success |
|
If the disk is created from a snapshot and linked cloning needs to be used, set this parameter to True. Returned: success |
|
If this parameter is set to True, the disk device type will be SCSI, which allows ECS OSs to directly access underlying storage media. SCSI reservation command is supported. If this parameter is set to False, the disk device type will be VBD, which supports only simple SCSI read/write commands. If parameter enable_share is set to True and this parameter is not specified, shared SCSI disks are created. SCSI EVS disks cannot be created from backups, which means that this parameter cannot be True if backup_id has been specified. Returned: success |
|
Specifies whether the disk is shareable. The default value is False. Returned: success |
|
Specifies the encryption ID. The length of it fixes at 36 bytes. Returned: success |
|
Specifies the enterprise project ID. This ID is associated with the disk during the disk creation. If it is not specified, the disk is bound to the default enterprise project. Returned: success |
|
Specifies the image ID. If this parameter is specified, the disk is created from an image. BMS system disks cannot be created from BMS images. Returned: success |
|
Specifies whether the disk is bootable. Returned: success |
|
Specifies whether the disk is read-only or read/write. True indicates that the disk is read-only. False indicates that the disk is read/write. Returned: success |
|
Specifies the disk name. The value can contain a maximum of 255 bytes. Returned: success |
|
Specifies the disk size, in GB. Its values are as follows, System disk 1 GB to 1024 GB, Data disk 10 GB to 32768 GB. This parameter is mandatory when you create an empty disk or use an image or a snapshot to create a disk. If you use an image or a snapshot to create a disk, the disk size must be greater than or equal to the image or snapshot size. This parameter is optional when you use a backup to create a disk. If this parameter is not specified, the disk size is equal to the backup size. Returned: success |
|
Specifies the snapshot ID. If this parameter is specified, the disk is created from a snapshot. Returned: success |
|
Specifies the source disk ID. This parameter has a value if the disk is created from a source disk. Returned: success |
|
Specifies the disk status. Returned: success |
|
Specifies the disk tags. Returned: success |
|
Specifies the disk type. Currently, the value can be SSD, SAS, or SATA. SSD specifies the ultra-high I/O disk type. SAS specifies the high I/O disk type. SATA specifies the common I/O disk type. If the specified disk type is not available in the AZ, the disk will fail to create. If the EVS disk is created from a snapshot, the volume_type field must be the same as that of the snapshot’s source disk. Returned: success |