dellemc.powerstore.cluster (3.2.0) — module

Manage cluster related operations on PowerStore

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

Authors: P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com>, Bhavneet Sharma (@sharmb5) <ansible.team@dell.com>

Install collection

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


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 3.2.0

Description

Managing cluster on PowerStore storage system includes creating cluster, validating create cluster attributes, getting details and modifying cluster configuration parameters.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details of cluster using id
  dellemc.powerstore.cluster:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    cluster_id: "0"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify details of cluster using the name
  dellemc.powerstore.cluster:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    cluster_name: "RT-D1320"
    appliance_id: "A1"
    is_ssh_enabled: true
    service_password: "S@mple_password"
    chap_mode: "Disabled"
    new_name: "new_RT-D1320"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Validate create cluster
  dellemc.powerstore.cluster:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    cluster_name: "RT-D1320"
    ignore_network_warnings: true
    appliances:
      - link_local_address: "1.2.x.x"
        name: "Ansible_cluster"
        drive_failure_tolerance_level: "Double"
    dns_servers:
      - "1.1.x.x"
    ntp_servers:
      - "1.3.x.x"
    networks:
      - type: "Management"
        vlan_id: 0
        prefix_length: 24
        gateway: "1.x.x.x"
        cluster_mgmt_address: "1.x.x.x"
        addresses:
          - "2.x.x.x"
          - "3.x.x.x"
      - type: "Storage"
        vlan_id: 0
        prefix_length: 42
        gateway: "1.x.x.x"
        storage_discovery_address: "1.x.x.x"
        addresses:
          - "2.x.x.x"
          - "3.x.x.x"
        purpose:
          - "ISCSI"
    is_http_redirect_enabled: true
    validate_create: true
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create cluster
  dellemc.powerstore.cluster:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    cluster_name: "RT-D1320"
    ignore_network_warnings: true
    appliances:
      - link_local_address: "1.2.x.x"
        name: "Ansible_cluster"
        drive_failure_tolerance_level: "Double"
    dns_servers:
      - "1.1.x.x"
    ntp_servers:
      - "1.3.x.x"
    physical_switch:
      - name: "Ansible_switch"
        purpose: "Management_Only"
        connections:
          - address: "1.x.x.x"
            port: 20
            connect_method: "SSH"
            username: "user"
            ssh_password: "password"
    networks:
      - type: "Management"
        vlan_id: 0
        prefix_length: 24
        gateway: "1.x.x.x"
        cluster_mgmt_address: "1.x.x.x"
        addresses:
          - "2.x.x.x"
          - "3.x.x.x"
      - type: "Storage"
        vlan_id: 0
        prefix_length: 42
        gateway: "1.x.x.x"
        storage_discovery_address: "1.x.x.x"
        addresses:
          - "2.x.x.x"
          - "3.x.x.x"
        purpose:
          - "ISCSI"
    vcenters:
      - address: "1.x.x.x"
        username: "user"
        password: "password"
        is_verify_server_cert: true
        vasa_provider_credentials:
          username: "user"
          password: "password"
    is_http_redirect_enabled: true
    wait_for_completion: false
    state: "present"

Inputs

    
port:
    description:
    - Port number for the PowerStore array.
    - If not passed, it will take 443 as default.
    type: int

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

state:
    choices:
    - absent
    - present
    description:
    - Define whether the cluster should exist or not.
    - Value C(present) indicates that the cluster should exist on the system.
    - Value C(absent) indicates that the cluster should not exist on the system.
    required: true
    type: str

timeout:
    default: 120
    description:
    - Time after which the connection will get terminated.
    - It is to be mentioned in seconds.
    type: int

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

networks:
    description:
    - Configuration of one or more network(s) based on network type.
    - This is mandatory for create cluster operation.
    elements: dict
    suboptions:
      addresses:
        description:
        - IP addresses in IPv4 format.
        elements: str
        required: true
        type: list
      cluster_mgmt_address:
        description:
        - New cluster management IP address in IPv4 format.
        type: str
      gateway:
        description:
        - Network gateway in IPv4 format.
        type: str
      prefix_length:
        description:
        - Network prefix length.
        required: true
        type: int
      purposes:
        choices:
        - ISCSI
        - NVMe_TCP
        - File_Mobility
        description:
        - Purpose of the network.
        - Only applicable for storage network.
        elements: str
        type: list
      storage_discovery_address:
        description:
        - New storage discovery IP address in IPv4 format.
        - This can be specified only when configure the storage network type.
        type: str
      type:
        choices:
        - Management
        - Intra_Cluster_Management
        - Intra_Cluster_Data
        - Storage
        - VMotion
        - File_Mobility
        description:
        - Specifies the type of the network.
        required: true
        type: str
      vlan_id:
        description:
        - The ID of the VLAN.
        type: int
    type: list

new_name:
    description:
    - The new name for the cluster.
    type: str

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

vcenters:
    description:
    - Configure vCenter settings when creating cluster.
    - Currently, for vcenters parameter API supports only single element.
    - This is required when creating PowerStore X cluster and optional for PowerStore
      T.
    elements: dict
    suboptions:
      address:
        description:
        - IP address of vCenter in IPv4 or hostname format.
        required: true
        type: str
      data_center_id:
        description:
        - The VMWare ID of datacenter.
        - This is used to join an existing datacenter in vcenter.
        - This should be specified when creating PowerStore X cluster.
        - Mutually exclusive with I(data_center_name).
        type: str
      data_center_name:
        description:
        - Name of the data center.
        - This is used to join an existing datacenter in vcenter.
        - This should be specified when creating PowerStore X cluster.
        - Mutually exclusive with I(data_center_id).
        type: str
      esx_cluster_name:
        description:
        - Name of the ESXi cluster.
        - This should be specified when creating PowerStore X cluster.
        type: str
      is_verify_server_cert:
        description:
        - Whether or not the connection will be secured with the vcenter SSL certificate.
        required: true
        type: bool
      password:
        description:
        - Password to login to vCenter.
        required: true
        type: str
      username:
        description:
        - User name to login to vCenter.
        required: true
        type: str
      vasa_provider_credentials:
        description:
        - Storage system credentials for vCenter to use for communicating with the storage
          system using VASA.
        required: true
        suboptions:
          password:
            description:
            - Password of the local user account which will be used by vSphere to register
              VASA provider.
            required: true
            type: str
          username:
            description:
            - Username of the local user account which will be used by vSphere to register
              VASA provider.
            required: true
            type: str
        type: dict
    type: list

chap_mode:
    choices:
    - Disabled
    - Single
    - Mutual
    description:
    - The mode that describes or sets the iSCSI CHAP mode for the cluster.
    type: str

appliances:
    description:
    - Appliance configuration setting during cluster creation.
    - This is mandatory for create cluster operation.
    elements: dict
    suboptions:
      drive_failure_tolerance_level:
        choices:
        - Single
        - Double
        description:
        - Specifies the possible drive failure tolerance levels.
        type: str
      link_local_address:
        description:
        - The unique IPv4 address of the appliance and is set by zeroconf.
        required: true
        type: str
      name:
        description:
        - Name of new appliance.
        type: str
    type: list

cluster_id:
    description:
    - Id of the cluster.
    type: str

dns_servers:
    description:
    - DNS server addresses in IPv4 format. At least one DNS server should be provided.
    - This is mandatory for create cluster operation.
    elements: str
    type: list

ntp_servers:
    description:
    - NTP server addresses in IPv4 or hostname format. At least one NTP server should
      be provided.
    - This is mandatory for create cluster operation.
    elements: str
    type: list

appliance_id:
    description:
    - ID of the appliance.
    - Parameters I(appliance_id) and I(appliance_name) are mutually exclusive.
    - Parameter I(is_ssh_enabled) has to be passed along with I(appliance_id).
    type: str

cluster_name:
    description:
    - The Name of cluster.
    type: str

physical_mtu:
    description:
    - MTU for ethernet ports in the cluster.
    - The MTU can be set between 1500 to 9000.
    type: int

appliance_name:
    description:
    - Name of the appliance.
    - Parameters I(appliance_id) and I(appliance_name) are mutually exclusive.
    - Parameter I(is_ssh_enabled) has to be passed along with I(appliance_name).
    type: str

is_ssh_enabled:
    description:
    - Whether SSH access is enabled for the cluster.
    - Either I(appliance_id) or I(appliance_name) is to be passed along with I(is_ssh_enabled).
    type: bool

validate_certs:
    aliases:
    - verifycert
    default: true
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - C(true) - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - C(false) - indicates that the SSL certificate should not be verified.
    type: bool

validate_create:
    default: true
    description:
    - Whether to perform create cluster validate call.
    type: bool

service_password:
    description:
    - The password for the service user.
    type: str

physical_switches:
    description:
    - Physical switch setting for a new cluster.
    elements: dict
    suboptions:
      connections:
        description:
        - specifies the supported connection for the physical switch.
        elements: dict
        required: true
        suboptions:
          address:
            description:
            - Specifies the physical switch address in IPv4 or DNS hostname format.
            required: true
            type: str
          connect_method:
            choices:
            - SSH
            - SNMPv2c
            description:
            - Specifies the connection method type for the physical Switch.
            required: true
            type: str
          port:
            description:
            - Specifies the port used for connection to switch.
            type: int
          snmp_community_string:
            description:
            - Specifies C(SNMPv2) community string, if C(SNMPv2) connect method is selected.
            type: str
          ssh_password:
            description:
            - Specifies SSH password to connect a physical switch.
            type: str
          username:
            description:
            - Specifies username to connect a physical switch for SSH connection method.
            type: str
        type: list
      name:
        description:
        - Name of the physical switch.
        required: true
        type: str
      purpose:
        choices:
        - Data_and_Management
        - Management_Only
        description:
        - Specifies the purpose of the physical switch.
        required: true
        type: str
    type: list

wait_for_completion:
    default: false
    description:
    - Flag to indicate if the operation should be run synchronously or asynchronously.
    - C(true) signifies synchronous execution. By default, create cluster operation will
      run asynchronously.
    type: bool

ignore_network_warnings:
    description:
    - Whether to ignore the network warning about unreachable external network.
    type: bool

is_http_redirect_enabled:
    description:
    - Whether to redirect the HTTP requests to HTTPS.
    type: bool

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'true'
  type: bool
cluster_details:
  contains:
    appliance_count:
      description: Number of appliances configured in this cluster.
      type: int
    appliance_details:
      contains:
        id:
          description: Id of the appliance.
          type: str
        name:
          description: Name of the appliance.
          type: str
      description: Name and Id of the appliance for which I(is_ssh_enabled) parameter
        is used.
      returned: When appliance name or id is passed in the playbook task.
      type: complex
    compatibility_level:
      description: The behavioral version of the software version API, It is used
        to ensure the compatibility across potentially different software versions.
      type: int
    global_id:
      description: The global unique identifier of the cluster.
      type: str
    id:
      description: The ID of the cluster.
      type: str
    is_encryption_enabled:
      description: Whether or not Data at Rest Encryption is enabled on the cluster.
      type: bool
    is_ssh_enabled:
      description: Whether or not the ssh is enabled.
      type: bool
    management_address:
      description: The floating management IP address for the cluster in IPv4 or IPv6
        format.
      type: str
    master_appliance_id:
      description: The unique identifier of the appliance acting as primary. This
        parameter is deprecated in version 2.0.0.0.
      type: str
    name:
      description: Name of the cluster.
      type: str
    physical_mtu:
      description: MTU for the cluster.
      type: int
    primary_appliance_id:
      description: The unique identifier of the appliance acting as primary. This
        parameter was added in version 2.0.0.0.
      type: str
    service_config_details:
      contains:
        appliance_id:
          description: Id of the appliance for which the service configuration exists.
          type: str
        id:
          description: Id of the service configuration.
          type: str
        is_ssh_enabled:
          description: Whether the ssh is enabled for the appliance or not.
          type: bool
      description: Details of the service config for the entered appliance.
      returned: When is_ssh_enabled is passed in the playbook task
      type: complex
    service_user_details:
      contains:
        id:
          description: Id of the service user.
          type: str
        is_built_in:
          description: Whether the service user is built in or not.
          type: bool
        is_default_password:
          description: Whether the service user has default password or not.
          type: bool
        name:
          description: Name of the service user.
          type: str
      description: Details of the service user for which the password can be updated.
      returned: when the cluster exists.
      type: complex
    state:
      description: Possible cluster states.
      type: str
    storage_discovery_address:
      description: The floating storage discovery IP address for the cluster in IPv4
        or IPv6 format.
      type: str
    system_time:
      description: Current clock time for the system. System time and all the system
        reported times are in UTC (GMT+0:00) format.
      type: str
  description: The cluster details.
  returned: When Cluster exists.
  sample:
    appliance_count: 1
    chap_mode: Disabled
    compatibility_level: 10
    global_id: PS00d01e1bb312
    id: 0
    is_encryption_enabled: true
    management_address: 1.2.3.4
    master_appliance_id: A1
    name: WN-D8977
    physical_mtu: 1500
    service_config_details: null
    state: Configured
    state_l10n: Configured
    storage_discovery_address: 10.230.42.228
    system_time: '2022-02-04T11:18:37.441Z'
  type: complex
job_details:
  contains:
    id:
      description: The ID of the job.
      type: str
  description: The job details.
  returned: When asynchronous task is performed.
  sample:
    description_l10n: Create Cluster.
    end_time: '2022-01-06T07:39:05.846+00:00'
    estimated_completion_time: null
    id: be0d099c-a6cf-44e8-88d7-9be80ccae369
    parent_id: null
    phase: Completed
    phase_l10n: Completed
    progress_percentage: 100
    resource_action: create
    resource_action_l10n: create
    resource_id: '0'
    resource_name: null
    resource_type: cluster
    resource_type_l10n: cluster
    response_body:
      id: 0
      response_type: job_create_response
    response_status: null
    response_status_l10n: null
    root_id: be0d099c-a6cf-44e8-88d7-9be80ccae369
    start_time: '2022-01-06T07:39:05.47+00:00'
    state: COMPLETED
    state_l10n: Completed
    step_order: 23792565
    user: admin
  type: complex