netapp.elementsw.na_elementsw_drive – NetApp Element Software Manage Node Drives

Note

This plugin is part of the netapp.elementsw collection (version 21.6.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 netapp.elementsw.

To use it in a playbook, specify: netapp.elementsw.na_elementsw_drive.

New in version 2.7.0: of netapp.elementsw

Synopsis

  • Add, Erase or Remove drive for nodes on Element Software Cluster.

Requirements

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

  • The modules were developed with SolidFire 10.1
  • solidfire-sdk-python (1.1.0.92) or greater. Install using ‘pip install solidfire-sdk-python’

Parameters

Parameter Choices/Defaults Comments
drive_ids
list / elements=string
List of Drive IDs or Serial Names of Node drives.
If not specified, add and remove action will be performed on all drives of node_id

aliases: drive_id
force_during_bin_sync
boolean
    Choices:
  • no
  • yes
Flag to force during a bin sync operation.
Not supported with latest version of SolidFire SDK (1.7.0.152)
force_during_upgrade
boolean
    Choices:
  • no
  • yes
Flag to force drive operation during upgrade.
Not supported with latest version of SolidFire SDK (1.7.0.152)
hostname
string / required
The hostname or IP address of the SolidFire cluster.
For na_elementsw_cluster, the Management IP (MIP) or hostname of the node to initiate the cluster creation from.
node_ids
list / elements=string
List of IDs or Names of cluster nodes.
If node_ids and drive_ids are not specified, all available drives in the cluster are added if state is present.
If node_ids and drive_ids are not specified, all active drives in the cluster are removed if state is absent.

aliases: node_id
password
string / required
Password for the specified user.

aliases: pass
state
string
    Choices:
  • present
  • absent
  • clean
Element SW Storage Drive operation state.
present - To add drive of node to participate in cluster data storage.
absent - To remove the drive from being part of active cluster.
clean - Clean-up any residual data persistent on a *removed* drive in a secured method.
username
string / required
Please ensure that the user has the adequate permissions. For more information, please read the official documentation https://mysupport.netapp.com/documentation/docweb/index.html?productID=62636&language=en-US.

aliases: user

Notes

Note

  • The modules prefixed with na\_elementsw are built to support the SolidFire storage platform.

Examples

- name: Add drive with status available to cluster
  tags:
  - elementsw_add_drive
  na_elementsw_drive:
    hostname: "{{ elementsw_hostname }}"
    username: "{{ elementsw_username }}"
    password: "{{ elementsw_password }}"
    state: present
    drive_ids: scsi-SATA_SAMSUNG_MZ7LM48S2UJNX0J3221807
    force_during_upgrade: false
    force_during_bin_sync: false
    node_ids: sf4805-meg-03

- name: Remove active drive from cluster
  tags:
  - elementsw_remove_drive
  na_elementsw_drive:
    hostname: "{{ elementsw_hostname }}"
    username: "{{ elementsw_username }}"
    password: "{{ elementsw_password }}"
    state: absent
    force_during_upgrade: false
    drive_ids: scsi-SATA_SAMSUNG_MZ7LM48S2UJNX0J321208

- name: Secure Erase drive
  tags:
  - elemensw_clean_drive
  na_elementsw_drive:
    hostname: "{{ elementsw_hostname }}"
    username: "{{ elementsw_username }}"
    password: "{{ elementsw_password }}"
    state: clean
    drive_ids: scsi-SATA_SAMSUNG_MZ7LM48S2UJNX0J432109
    node_ids: sf4805-meg-03

- name: Add all the drives of all nodes to cluster
  tags:
  - elementsw_add_node
  na_elementsw_drive:
    hostname: "{{ elementsw_hostname }}"
    username: "{{ elementsw_username }}"
    password: "{{ elementsw_password }}"
    state: present
    force_during_upgrade: false
    force_during_bin_sync: false

Return Values

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

Key Returned Description
msg
string
success
Success message



Authors

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/netapp/elementsw/na_elementsw_drive_module.html