dellemc.powerstore.dellemc_powerstore_gatherfacts (1.3.0) — module

Gathers information about PowerStore Storage entities

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

Authors: Arindam Datta (@dattaarindam) <ansible.team@dell.com>, Vivek Soni (@v-soni11) <ansible.team@dell.com>

preview | supported by community

Install collection

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


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 1.3.0

Description

Gathers the list of specified PowerStore Storage System entities, such as the list of cluster nodes, volumes, volume groups, hosts, host groups, snapshot rules, protection policies, NAS servers, NFS exports, SMB shares, tree quotas, user quotas, file systems etc.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Get list of volumes, volume groups, hosts, host groups and node
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - vol
      - vg
      - host
      - hg
      - node
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of replication related entities
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - replication_rule
      - replication_session
      - remote_system
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of volumes whose state notequal to ready
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - vol
    filters:
      - filter_key: "state"
        filter_operator: "notequal"
        filter_value: "ready"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of protection policies and snapshot rules
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - protection_policy
      - snapshot_rule
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of snapshot rules whose desired_retention between 101-499
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - snapshot_rule
    filters:
      - filter_key: "desired_retention"
        filter_operator: "greater"
        filter_value: "100"
      - filter_key: "desired_retention"
        filter_operator: "lesser"
        filter_value: "500"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of nas server, nfs_export and smb share
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - nas_server
      - nfs_export
      - smb_share
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of tree quota, user quota and file system
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - tree_quota
      - user_quota
      - file_system
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of nas server whose name equal to 'nas_server'
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - nas_server
    filters:
      - filter_key: "name"
        filter_operator: "equal"
        filter_value: "nas_server"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of smb share whose name contains 'share'
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - nas_server
    filters:
      - filter_key: "name"
        filter_operator: "like"
        filter_value: "*share*"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of user, role, network and appliances
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - user
      - role
      - network
      - appliance
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get list of networks whose name contains 'Management'
  dellemc_powerstore_gatherfacts:
    array_ip: "{{array_ip}}"
    verifycert: "{{verifycert}}"
    user: "{{user}}"
    password: "{{password}}"
    gather_subset:
      - network
    filters:
      - filter_key: "name"
        filter_operator: "like"
        filter_value: "*Management*"

Inputs

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

filters:
    description:
    - A list of filters to support filtered output for storage entities.
    - Each filter is a list of filter_key, filter_operator, filter_value.
    - Supports passing of multiple filters.
    elements: dict
    required: false
    suboptions:
      filter_key:
        description:
        - Name identifier of the filter.
        required: true
        type: str
      filter_operator:
        choices:
        - equal
        - greater
        - lesser
        - like
        - notequal
        description:
        - Operation to be performed on the filter key.
        required: true
        type: str
      filter_value:
        description:
        - Value of the filter key.
        required: true
        type: str
    type: list

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

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

all_pages:
    default: false
    description:
    - Indicates whether to return all available entities on the storage system.
    - If set to True, the Gather Facts module will implement pagination and return all
      entities. Otherwise, a maximum of the first 100 entities of any type will be returned.
    type: bool

verifycert:
    choices:
    - true
    - false
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - True - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - False - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

gather_subset:
    choices:
    - vol
    - vg
    - host
    - hg
    - node
    - protection_policy
    - snapshot_rule
    - nas_server
    - nfs_export
    - smb_share
    - tree_quota
    - user_quota
    - file_system
    - replication_rule
    - replication_session
    - remote_system
    - network
    - role
    - user
    - appliance
    description:
    - A list of string variables which specify the PowerStore system entities requiring
      information.information.
    - vol - volumes
    - node - all the nodes
    - vg - volume groups
    - protection_policy - protection policy
    - host - hosts
    - hg -  host groups
    - snapshot_rule - snapshot rule
    - nas_server - NAS servers
    - nfs_export - NFS exports
    - smb_share - SMB shares
    - tree_quota - tree quotas
    - user_quota - user quotas
    - file_system - file systems
    - replication_rule - replication rules
    - replication_session - replication sessions
    - remote_system - remote systems
    - network - various networks
    - role - roles
    - user - local users
    - appliance - appliances
    elements: str
    required: true
    type: list

Outputs

changed:
  description: Shows whether or not the resource has changed.
  returned: always
  type: bool
subset_result:
  contains:
    Appliance:
      contains:
        id:
          description: appliance id
          type: str
        model:
          description: Model type of the PowerStore
          type: str
        name:
          description: appliance name
          type: str
      description: Provides details of all appliances.
      type: list
    Cluster:
      contains:
        id:
          description: cluster id
          returned: always
          type: str
        name:
          description: cluster name
          returned: always
          type: str
      description: Provides details of all clusters.
      returned: always
      type: list
    FileSystems:
      contains:
        id:
          description: filesystem id
          type: str
        name:
          description: filesystem name
          type: str
      description: Provides details of all filesystems.
      returned: When file_system is in a given gather_subset
      type: list
    HostGroups:
      contains:
        id:
          description: hostgroup id
          type: str
        name:
          description: hostgroup name
          type: str
      description: Provides details of all hostgroups.
      returned: When hg is in a given gather_subset
      type: list
    Hosts:
      contains:
        id:
          description: host id
          type: str
        name:
          description: host name
          type: str
      description: Provides details of all hosts.
      returned: When host is in a given gather_subset
      type: list
    LocalUsers:
      contains:
        id:
          description: user id
          type: str
        name:
          description: user name
          type: str
      description: Provides details of all local users.
      returned: When user is in a given gather_subset
      type: list
    NASServers:
      contains:
        id:
          description: nas server id
          type: str
        name:
          description: nas server name
          type: str
      description: Provides details of all nas servers.
      returned: When nas_server is in a given gather_subset
      type: list
    NFSExports:
      contains:
        id:
          description: nfs export id
          type: str
        name:
          description: nfs export name
          type: str
      description: Provides details of all nfs exports.
      returned: When nfs_export is in a given gather_subset
      type: list
    Networks:
      contains:
        id:
          description: network id
          type: str
        name:
          description: network name
          type: str
      description: Provides details of all networks.
      returned: When network is in a given gather_subset
      type: list
    Nodes:
      contains:
        id:
          description: node id
          type: str
        name:
          description: node name
          type: str
      description: Provides details of all nodes.
      returned: When a node is in a given gather_subset
      type: list
    ProtectionPolicies:
      contains:
        id:
          description: protectionpolicy id
          type: str
        name:
          description: protectionpolicy name
          type: str
      description: Provides details of all protectionpolicies.
      returned: When protection_policy is in a given gather_subset
      type: list
    RemoteSystems:
      contains:
        id:
          description: remote system id
          type: str
        name:
          description: remote system name
          type: str
      description: Provides details of all remote systems.
      returned: When remote_system is in a given gather_subset
      type: list
    ReplicationRules:
      contains:
        id:
          description: replication rule id
          type: str
        name:
          description: replication rule name
          type: str
      description: Provides details of all replication rules.
      returned: When replication_rule is in a given gather_subset
      type: list
    ReplicationSession:
      contains:
        id:
          description: replication session id
          type: str
      description: details of all replication sessions.
      returned: when replication_session given in gather_subset
      type: list
    Roles:
      contains:
        id:
          description: role id
          type: str
        name:
          description: role name
          type: str
      description: Provides details of all roles.
      returned: When role is in a given gather_subset
      type: list
    SMBShares:
      contains:
        id:
          description: smb share id
          type: str
        name:
          description: smb share name
          type: str
      description: Provides details of all smb shares.
      returned: When smb_share are in a given gather_subset
      type: list
    SnapshotRules:
      contains:
        id:
          description: snapshot rule id
          type: str
        name:
          description: snapshot rule name
          type: str
      description: Provides details of all snapshot rules.
      returned: When snapshot_rule is in a given gather_subset
      type: list
    TreeQuotas:
      contains:
        id:
          description: tree quota id
          type: str
        path:
          description: tree quota path
          type: str
      description: Provides details of all tree quotas.
      returned: When tree_quota is in a given gather_subset
      type: list
    UserQuotas:
      contains:
        id:
          description: user quota id
          type: str
      description: Provides details of all user quotas.
      returned: When user_quota is in a given gather_subset
      type: list
    VolumeGroups:
      contains:
        id:
          description: volumegroup id
          type: str
        name:
          description: volumegroup name
          type: str
      description: Provides details of all volumegroups.
      returned: When vg is in a given gather_subset
      type: list
    Volumes:
      contains:
        id:
          description: volume id
          type: str
        name:
          description: volume name
          type: str
      description: Provides details of all volumes.
      returned: When vol is in a given gather_subset
      type: list
  description: Provides details of all given subsets.
  returned: always
  type: complex