hpe.nimble.hpe_nimble_info module – Collect information from HPE Nimble Storage array
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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hpe.nimble.hpe_nimble_info
.
New in hpe.nimble 1.0.0
Synopsis
Collect information from a HPE Nimble Storage array. By default, the module will collect basic information including array, groups config, protection templates, protection schedules, snapshots, snapshot collections, volume collections and volume counts. Additional information can be collected based on the configured set of arguments.
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 |
---|---|
When supplied, this argument will define the information to be collected. Possible values for this include “all” “minimum” “config” “access_control_records”, “alarms”, “application_servers”, “application_categories”, “arrays”, “chap_users”, “controllers”, “disks”, “fibre_channel_interfaces”, “fibre_channel_configs”, “fibre_channel_initiator_aliases”, “fibre_channel_ports”, “folders”, “groups”, “initiator_groups”, “initiators”, “master_key”, “network_configs”, “performance_policies”, “pools”, “protection_schedules”, “protection_templates”, “protocol_endpoints”, “replication_partners”, “shelves”, “snapshots”, “snapshot_collections”, “software_versions”, “user_groups”, “user_policies”, “users”, “volumes”, “volume_collections”. Each subset except “all”, “minimum” and “config” supports four types of subset options. Subset “all” supports limit and detail as subset options. Subset “config” and “minimum” does not support any subset options. See the example section for usage of the following subset options. fields - A string representing which attributes to display for a given subset. limit - An integer value which represents how many latest items to show for a given subset. detail - A bool flag when set to true fetches everything for a given subset. Default is “True”. query - A key-value pair to query. Default: |
|
HPE Nimble Storage IP address. |
|
HPE Nimble Storage password. |
|
HPE Nimble Storage user name. |
Notes
Note
This module supports
check_mode
.
Examples
- name: Collect default set of information
hpe.nimble.hpe_nimble_info:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
gather_subset:
- minimum:
register: array_info
- name: Show default information
ansible.builtin.debug:
msg: "{{ array_info['nimble_info']['default'] }}"
- name: Collect config
hpe.nimble.hpe_nimble_info:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
gather_subset:
- config:
register: array_info
- name: Show config information
ansible.builtin.debug:
msg: "{{ array_info['nimble_info']['config'] }}"
- name: Collect all
hpe.nimble.hpe_nimble_info:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
gather_subset:
- all:
limit: 1
register: array_info
- name: Show all information
ansible.builtin.debug:
msg: "{{ array_info['nimble_info'] }}"
- name: Collect volume, snapshot and volume collection. Below query will show just one
snapshot detail with attributes 'name and id' for a volume called 'vol1'
hpe.nimble.hpe_nimble_info:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
gather_subset:
- volumes:
fields: "name,id"
limit: 2
- volume_collections:
limit: 1
detail: false
- snapshots:
fields: "name,id"
query:
vol_name: "vol1"
limit: 1
detail: True
register: array_info
- name: Show information
ansible.builtin.debug:
msg: "{{ array_info['nimble_info'] }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Returns the information collected from the HPE Nimble Storage array Returned: always Sample: |