dellemc.powerstore.dellemc_powerstore_volumegroup (1.3.0) — module

Manage volume groups on a PowerStore Storage System

| "added in version" 1.0.0 of dellemc.powerstore"

Authors: Akash Shendge (@shenda1) <ansible.team@dell.com>, Arindam Datta (@dattaarindam) <ansible.team@dell.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 1.3.0

Description

Managing volume group on PowerStore Storage System includes creating new volume group, adding volumes to volume group, removing volumes from volume group, renaming volume group, modifying volume group, and deleting volume group.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create volume group without protection policy
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    vg_name: "{{vg_name}}"
    description: "This volume group is for ansible"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get details of volume group
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    vg_name: "{{vg_name}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add volumes to volume group
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    vg_name: "{{vg_name}}"
    state: "present"
    volumes:
      - "7f879569-676c-4749-a06f-c2c30e09b295"
      - "68e4dad5-5de5-4644-a98f-6d4fb916e169"
      - "Ansible_Testing"
    vol_state: "present-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove volumes from volume group
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    vg_name: "{{vg_name}}"
    state: "present"
    volumes:
      - "7f879569-676c-4749-a06f-c2c30e09b295"
      - "Ansible_Testing"
    vol_state: "absent-in-group"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename volume group and change is_write_order_consistent flag
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    vg_name: "{{vg_name}}"
    new_vg_name: "{{new_vg_name}}"
    is_write_order_consistent: False
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get details of volume group by ID
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    vg_id: "{{vg_id}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete volume group
  dellemc_powerstore_volumegroup:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    name: "{{new_vg_name}}"
    state: "absent"

Inputs

    
user:
    description:
    - The username of the PowerStore host.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Define whether the volume group should exist or not.
    required: true
    type: str

vg_id:
    description:
    - The id of the volume group.
    - It can be used only for Modify, Add/Remove, or Delete operation.
    required: false
    type: str

vg_name:
    description:
    - The name of the volume group.
    required: false
    type: str

volumes:
    description:
    - This is a list of volumes.
    - Either the volume ID or name must be provided for adding/removing existing volumes
      from a volume group.
    - If volumes are given, then vol_state should also be specified.
    elements: str
    type: list

array_ip:
    description:
    - IP or FQDN of the PowerStore management system.
    required: true
    type: str

password:
    description:
    - The password of the PowerStore host.
    required: true
    type: str

vol_state:
    choices:
    - present-in-group
    - absent-in-group
    description:
    - String variable. Describes the state of volumes inside a volume group.
    - If volume is given, then vol_state should also be specified.
    type: str

verifycert:
    choices:
    - true
    - false
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - True - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - False - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

description:
    description:
    - Description about the volume group.
    type: str

new_vg_name:
    description:
    - The new name of the volume group.
    type: str

protection_policy:
    description:
    - String variable. Represents Protection policy id or name used for volume group.
    - Specifying an empty string or "" removes the existing protection policy from volume
      group.
    required: false
    type: str

is_write_order_consistent:
    description:
    - A boolean flag to indicate whether Snapshot sets of the volume group will be write-order
      consistent.
    - If this parameter is not specified, the array by default sets it to true.
    required: false
    type: bool

Outputs

add_vols_to_vg:
  description: A boolean flag to indicate whether volume/s got added to volume group.
  returned: When value exists
  type: bool
changed:
  description: Whether or not the resource has changed.
  returned: always
  type: bool
create_vg:
  description: A boolean flag to indicate whether volume group got created.
  returned: When value exists
  type: bool
delete_vg:
  description: A boolean flag to indicate whether volume group got deleted.
  returned: When value exists
  type: bool
modify_vg:
  description: A boolean flag to indicate whether volume group got modified.
  returned: When value exists
  type: bool
remove_vols_from_vg:
  description: A boolean flag to indicate whether volume/s got removed from volume
    group.
  returned: When value exists
  type: bool
volume_group_details:
  contains:
    description:
      description: description about the volume group.
      type: str
    id:
      description: The system generated ID given to the volume group.
      type: str
    is_write_order_consistent:
      description: A boolean flag to indicate whether snapshot sets of the volume
        group will be write-order consistent.
      type: bool
    name:
      description: Name of the volume group.
      type: str
    protection_policy_id:
      description: The protection policy of the volume group.
      type: str
    type:
      description: The type of the volume group.
      type: str
    volumes:
      contains:
        id:
          description: The system generated ID given to the volume associated with
            the volume group.
          type: str
        name:
          description: The name of the volume associated with the volume group.
          type: str
      description: The volumes details of the volume group.
      type: complex
  description: Details of the volume group.
  returned: When volume group exists
  type: complex