hpe.nimble.hpe_nimble_partner module – Manage the HPE Nimble Storage Replication Partner

Note

This module is part of the hpe.nimble collection (version 1.1.4).

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 hpe.nimble.

To use it in a playbook, specify: hpe.nimble.hpe_nimble_partner.

New in version 1.0.0: of hpe.nimble

Synopsis

  • Manage the replication partner on an HPE Nimble Storage group.

Requirements

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

  • Ansible 2.9 or later

  • Python 3.6 or later

  • HPE Nimble Storage SDK for Python

  • HPE Nimble Storage arrays running NimbleOS 5.0 or later

Parameters

Parameter

Comments

control_port

integer

Port number of partner control interface. Value -1 for an invalid port or a positive integer value up to 65535 representing the TCP/IP port.

data_port

integer

Port number of partner data interface. Value -1 for an invalid port or a positive integer value up to 65535 representing the TCP/IP port.

description

string

Description of replication partner.

downstream_hostname

string / required

IP address or hostname of partner interface. This must be the partner’s Group Management IP address. String of up to 64 alphanumeric characters, - and . and ‘:’ are allowed after first character.

folder

string

The Folder ID within the pool where volumes replicated from this partner will be created. This is not supported for pool partners.

host

string / required

HPE Nimble Storage IP address.

match_folder

boolean

Indicates whether to match the upstream volume’s folder on the downstream.

Choices:

  • no

  • yes

name

string

Name of replication partner. String of up to 64 alphanumeric characters, - and . and ‘:’ are allowed after first character.

password

string / required

HPE Nimble Storage password.

pause

boolean

Pause replication for the specified partner.

Choices:

  • no

  • yes

pool

string

The pool name where volumes replicated from this partner will be created. Replica volumes created as clones ignore this parameter and are always created in the same pool as their parent volume.

repl_data_hostname

string

IP address or hostname of partner data interface. String of up to 64 alphanumeric characters, - and . and ‘:’ are allowed after first character.

resume

boolean

Resume replication for the specified partner.

Choices:

  • no

  • yes

secret

string

Replication partner shared secret, used for mutual authentication of the partners.

state

string / required

The replication partner operation.

Choices:

  • create

  • present

  • absent

subnet_label

string

Indicates whether to match the upstream volume’s folder on the downstream.

subnet_type

string

Type of the subnet used to replicate to this partner.

Choices:

  • invalid

  • unconfigured

  • unconfigured

  • mgmt

  • data

  • mgmt_data

test

boolean

Test connectivity to the specified partner.

Choices:

  • no

  • yes

throttles

list / elements=dictionary

Throttles used while replicating from/to this partner. All the throttles for the partner.

username

string / required

HPE Nimble Storage user name.

Notes

Note

  • This module does not support check_mode.

Examples

# if state is create, then create partner, fails if it exist or cannot create
# if state is present, then create partner if not present ,else success
- name: Create Partner
  hpe.nimble.hpe_nimble_partner:
    host: "{{ host }}"  # upstream host
    username: "{{ username }}"
    password: "{{ password }}"
    name: "{{ name | mandatory }}"
    description: "{{ description }}"
    downstream_hostname: "{{ downstream_hostname | mandatory }}"
    secret: "{{ secret | mandatory }}"
    subnet_label: "{{ subnet_label | mandatory }}"
    state: "{{ state | default('present') }}"

- name: Delete Partner
  hpe.nimble.hpe_nimble_partner:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    downstream_hostname: "{{ downstream_hostname | mandatory }}"
    state: "absent"

- name: Test Partner
  hpe.nimble.hpe_nimble_partner:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    downstream_hostname: "{{ downstream_hostname | mandatory }}"
    state: "present"
    test: true

- name: Pause Partner
  hpe.nimble.hpe_nimble_partner:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    downstream_hostname: "{{ downstream_hostname | mandatory }}"
    state: "present"
    pause: true

- name: Resume Partner
  hpe.nimble.hpe_nimble_partner:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    downstream_hostname: "{{ downstream_hostname | mandatory }}"
    state: "present"
    resume: true

Authors

  • HPE Nimble Storage Ansible Team (@ar-india)