dellemc.powerflex.device_group module – Manage Device Groups on Dell PowerFlex

Note

This module is part of the dellemc.powerflex collection (version 3.0.0).

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 dellemc.powerflex. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.powerflex.device_group.

New in dellemc.powerflex 3.0.0

Synopsis

  • Managing device groups on PowerFlex Gen2 storage systems includes getting details of a device group, renaming a device group, updating spare node and spare device counts, and querying usable capacity.

  • Device group creation and deletion are not supported by this module.

  • Support only for PowerFlex 5.0 versions and above.

Requirements

The below requirements are needed on the host that executes this module.

  • A Dell PowerFlex storage system version 5.0 or later.

  • PyPowerFlex 2.0.0

Parameters

Parameter

Comments

device_group_id

string

The ID of the device group.

Mutually exclusive with device_group_name.

device_group_name

string

The name of the device group.

Mutually exclusive with device_group_id.

hostname

aliases: gateway_host

string / required

IP or FQDN of the PowerFlex host.

media_type

string

Media type of the device group.

Query and validation only; it cannot be modified.

Choices:

  • "SSD"

  • "PMEM"

new_device_group_name

string

New name for the device group (rename operation).

password

string / required

The password of the PowerFlex host.

port

integer

Port number through which communication happens with PowerFlex host.

Default: 443

protection_domain_id

string

ID of the protection domain for device group identification/validation.

Mutually exclusive with protection_domain_name.

protection_domain_name

string

Name of the protection domain for device group identification/validation.

Mutually exclusive with protection_domain_id.

query_usable_capacity

boolean

Whether to query the usable capacity of the device group.

This is a read-only operation.

Choices:

  • false ← (default)

  • true

spare_device_count

integer

Spare device count for the device group.

spare_node_count

integer

Spare node count for the device group.

state

string

State of the device group.

Only present is supported; the module manages existing device groups and does not create or delete them.

Choices:

  • "present" ← (default)

timeout

integer

Time after which connection will get terminated.

It is to be mentioned in seconds.

Default: 120

username

string / required

The username of the PowerFlex host.

validate_certs

aliases: verifycert

boolean

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.

Choices:

  • false

  • true ← (default)

Attributes

Attribute

Support

Description

check_mode

Support: full

Runs task to validate without performing action on the target machine.

diff_mode

Support: full

Runs the task to report the changes made or to be made.

Notes

Note

  • The modules present in the collection named as ‘dellemc.powerflex’ are built to support the Dell PowerFlex storage platform.

Examples

- name: Get device group details by name
  dellemc.powerflex.device_group:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "<your_password>"
    validate_certs: "{{ validate_certs }}"
    device_group_name: "DG1"
    state: "present"

- name: Get device group details by ID
  dellemc.powerflex.device_group:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "<your_password>"
    validate_certs: "{{ validate_certs }}"
    device_group_id: "39a898be00000000"
    state: "present"

- name: Rename device group and update spare counts
  dellemc.powerflex.device_group:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "<your_password>"
    validate_certs: "{{ validate_certs }}"
    device_group_name: "DG1"
    new_device_group_name: "DG1_renamed"
    spare_node_count: 2
    spare_device_count: 1
    state: "present"

- name: Query usable capacity for a device group
  dellemc.powerflex.device_group:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "<your_password>"
    validate_certs: "{{ validate_certs }}"
    device_group_id: "39a898be00000000"
    query_usable_capacity: true
    state: "present"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Whether or not the resource has changed.

Returned: always

Sample: false

device_group_details

dictionary

Details of the device group.

Returned: When device group exists

Sample: {"id": "39a898be00000000", "links": [], "mediaType": "SSD", "name": "test_dg", "protectionDomainId": "7bd6457000000000", "spareDeviceCount": 1, "spareNodeCount": 1}

id

string

Device group ID.

Returned: success

list / elements=string

Related resource links.

Returned: success

mediaType

string

Media type of the device group.

Returned: success

name

string

Device group name.

Returned: success

protectionDomainId

string

Protection domain ID.

Returned: success

spareDeviceCount

integer

Spare device count.

Returned: success

spareNodeCount

integer

Spare node count.

Returned: success

usable_capacity_details

dictionary

Usable capacity details for the device group.

Returned: When query_usable_capacity is true

Sample: {"39a898be00000000": {"numProtectionSlices": 2}}

Authors

  • Dell Technologies (@dellemc)