dellemc.powerflex.storage_node module – Manage storage node on Dell PowerFlex 5.x

Note

This module is part of the dellemc.powerflex collection (version 3.2.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.storage_node.

New in dellemc.powerflex 3.2.0

Synopsis

  • Dell PowerFlex storage node module includes getting the details of a storage node, adding/removing IP addresses, modifying IP roles, renaming a storage node, and updating device pathnames.

  • This module is supported only on Dell PowerFlex 5.x and later versions. There is no Gen1 predecessor module for this entity — the Gen1 equivalent for SDS management is dellemc.powerflex.sds.

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

force_failed_devices

boolean

Force the pathname update for failed devices.

Only applicable when update_pathnames is true.

Choices:

  • false ← (default)

  • true

hostname

aliases: gateway_host

string / required

IP or FQDN of the PowerFlex host.

node_ip_list

list / elements=dictionary

Dictionary of IPs and their roles for the storage node.

Mutually exclusive with update_pathnames.

Required together with node_ip_state.

ip

string / required

IP address of the storage node.

role

string / required

Role assigned to the storage node IP address.

Choices:

  • "Storage"

  • "App"

  • "StorageAndApp"

node_ip_state

string

State of IP with respect to the storage node.

Required together with node_ip_list.

Choices:

  • "present-in-node"

  • "absent-in-node"

password

string / required

The password of the PowerFlex host.

port

integer

Port number through which communication happens with PowerFlex host.

Default: 443

state

string / required

The state of the storage node. Only present is supported.

Choices:

  • "present"

storage_node_id

string

The ID of the storage node.

Mutually exclusive with storage_node_name.

storage_node_name

string

The name of the storage node.

Mutually exclusive with storage_node_id.

storage_node_new_name

string

Used to rename the storage node.

Mutually exclusive with update_pathnames.

timeout

integer

Time after which connection will get terminated.

It is to be mentioned in seconds.

Default: 120

update_pathnames

boolean

Trigger a device pathname refresh on the storage node.

This is a non-idempotent action — changed is always reported as true when set to true (outside check mode).

Mutually exclusive with node_ip_list and storage_node_new_name.

Choices:

  • false ← (default)

  • true

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)

Notes

Note

  • This module is supported on Dell PowerFlex 5.x and later versions.

  • IP role values are Storage, App, and StorageAndApp.

  • state=absent is not supported — storage node creation and deletion are out of scope for this module.

  • update_pathnames always reports changed=true and is mutually exclusive with node_ip_list and storage_node_new_name.

  • The check_mode is supported.

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

Examples

- name: Get storage node details using name
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    state: "present"

- name: Get storage node details using ID
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_id: "5718253c00000004"
    state: "present"

- name: Add IP to storage node
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    node_ip_list:
      - ip: "10.0.0.2"
        role: "App"
    node_ip_state: "present-in-node"
    state: "present"

- name: Remove IP from storage node
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    node_ip_list:
      - ip: "10.0.0.2"
        role: "App"
    node_ip_state: "absent-in-node"
    state: "present"

- name: Change IP role on storage node
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    node_ip_list:
      - ip: "10.0.0.1"
        role: "StorageAndApp"
    node_ip_state: "present-in-node"
    state: "present"

- name: Rename storage node
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    storage_node_new_name: "node1_new"
    state: "present"

- name: Update device pathnames on storage node
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    update_pathnames: true
    state: "present"

- name: Update device pathnames with force for failed devices
  dellemc.powerflex.storage_node:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    storage_node_name: "node1"
    update_pathnames: true
    force_failed_devices: 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

storage_node_details

dictionary

Details of the storage node.

Returned: When storage node exists

Sample: {"id": "e59841fd00000002", "ipsList": [{"ip": "10.0.0.1", "role": "Storage"}], "name": "node1", "protectionDomainId": "e59841fd00000001", "protectionDomainName": "domain1"}

id

string

Storage node ID.

Returned: success

ipsList

list / elements=string

List of IPs and their roles.

Returned: success

ip

string

IP address.

Returned: success

role

string

Role assigned to the IP.

Returned: success

name

string

Name of the storage node.

Returned: success

protectionDomainId

string

Associated protection domain ID.

Returned: success

protectionDomainName

string

Associated protection domain name.

Returned: success

Authors

  • Saksham Nautiyal (@Saksham-Nautiyal)