dellemc / dellemc.unity / 1.2.1 / module / dellemc_unity_volume Manage volume on Unity storage system | "added in version" 1.1.0 of dellemc.unity" Authors: Arindam Datta (@arindam-emc) <ansible.team@dell.com> preview | supported by communitydellemc.unity.dellemc_unity_volume (1.2.1) — module
Install with ansible-galaxy collection install dellemc.unity:==1.2.1
collections: - name: dellemc.unity version: 1.2.1
Managing volume on Unity storage system includes- Create new volume, Modify volume attributes, Map Volume to host, Unmap volume to host, Display volume details, Delete volume.
- name: Create Volume dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_name: "{{vol_name}}" description: "{{description}}" pool_name: "{{pool}}" size: 2 cap_unit: "{{cap_GB}}" state: "{{state_present}}"
- name: Expand Volume by volume id dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_id: "{{vol_id}}" size: 5 cap_unit: "{{cap_GB}}" state: "{{state_present}}"
- name: Modify Volume, map host by host_name dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_name: "{{vol_name}}" host_name: "{{host_name}}" hlu: 5 mapping_state: "{{state_mapped}}" state: "{{state_present}}"
- name: Modify Volume, unmap host mapping by host_name dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_name: "{{vol_name}}" host_name: "{{host_name}}" mapping_state: "{{state_unmapped}}" state: "{{state_present}}"
- name: Map multiple hosts to a Volume dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_id: "{{vol_id}}" hosts: - host_name: "10.226.198.248" hlu: 1 - host_id: "Host_929" hlu: 2 mapping_state: "mapped" state: "present"
- name: Modify Volume attributes dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_name: "{{vol_name}}" new_vol_name: "{{new_vol_name}}" tiering_policy: "AUTOTIER" compression: True state: "{{state_present}}"
- name: Delete Volume by vol name dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_name: "{{vol_name}}" state: "{{state_absent}}"
- name: Delete Volume by vol id dellemc.unity.dellemc_unity_volume: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_id: "{{vol_id}}" state: "{{state_absent}}"
sp: choices: - SPA - SPB description: - Storage Processor for this volume. type: str hlu: description: - Host Lun Unit to be mapped/unmapped with this volume. - It is an optional parameter, hlu can be specified along with host_name or host_id and mapping_state. - If hlu is not specified, unity will choose it automatically. The maximum value supported is 255. type: int port: default: 443 description: - Port number through which communication happens with Unity management server. required: false type: int size: description: - The size of the volume. type: int hosts: description: - Name of hosts for mapping to a volume. elements: dict suboptions: hlu: description: - Host Lun Unit to be mapped/unmapped with this volume. - It is an optional parameter, hlu can be specified along with host_name or host_id and mapping_state. - If hlu is not specified, unity will choose it automatically. The maximum value supported is 255. type: str host_id: description: - ID of the host. type: str host_name: description: - Name of the host. type: str type: list state: choices: - absent - present description: - State variable to determine whether volume will exist or not. required: true type: str vol_id: description: - The id of the volume. - It can be used only for get, modify, map/unmap host, or delete operation. required: false type: str host_id: description: - ID of the host to be mapped/unmapped with this volume. - Either host_name or host_id can be specified in one task along with mapping_state. type: str is_thin: default: true description: - Boolean variable , specifies whether or not it is a thin volume. type: bool pool_id: description: - This is the id of the pool where the volume will be created. - Either the pool_name or pool_id must be provided to create a new volume. type: str cap_unit: choices: - GB - TB description: - The unit of the volume size. It defaults to 'GB', if not specified. type: str password: description: - The password of the Unity management server. required: true type: str username: description: - The username of the Unity management server. required: true type: str vol_name: description: - The name of the volume. Mandatory only for create operation. required: false type: str host_name: description: - Name of the host to be mapped/unmapped with this volume. - Either host_name or host_id can be specified in one task along with mapping_state. type: str pool_name: description: - This is the name of the pool where the volume will be created. - Either the pool_name or pool_id must be provided to create a new volume. type: str verifycert: choices: - true - false default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - True - Indicates that the SSL certificate should be verified. - False - Indicates that the SSL certificate should not be verified. required: false type: bool compression: description: - Boolean variable , specifies whether or not to enable compression. Compression is supported only for thin volumes. type: bool description: description: - Description about the volume. - Description can be removed by passing empty string (""). type: str new_vol_name: description: - New name of the volume for rename operation. type: str mapping_state: choices: - mapped - unmapped description: - State of host access for volume. type: str snap_schedule: description: - Snapshot schedule assigned to the volume. - Add/Remove/Modify the snapshot schedule for the volume. type: str unispherehost: description: - IP or FQDN of the Unity management server. required: true type: str tiering_policy: choices: - AUTOTIER_HIGH - AUTOTIER - HIGHEST - LOWEST description: - Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. type: str io_limit_policy: description: - IO limit policy associated with this volume. Once it is set, it cannot be removed through ansible module but it can be changed. type: str
changed: description: Whether or not the resource has changed. returned: always type: bool volume_details: contains: current_sp: description: Current storage processor for this volume type: str description: description: Description about the volume type: str host_access: description: Host mapped to this volume type: list id: description: The system generated ID given to the volume type: str io_limit_policy: description: IO limit policy associated with this volume type: dict is_data_reduction_enabled: description: Whether or not compression enabled on this volume type: bool is_thin_enabled: description: Indicates whether thin provisioning is enabled for this volume type: bool name: description: Name of the volume type: str pool: description: The pool in which this volume is allocated. type: dict size_total_with_unit: description: Size of the volume with actual unit. type: str snap_schedule: description: Snapshot schedule applied to this volume type: dict tiering_policy: description: Tiering policy applied to this volume type: str wwn: description: The world wide name of this volume type: str description: Details of the volume. returned: When volume exists type: complex