netapp_e_lun_mapping - Create or Remove LUN Mappings
New in version 2.2.
Synopsis
- Allows for the creation and removal of volume to host mappings for NetApp E-series storage arrays.
Options
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| api_password | no | The password used to authenticate against the API. This can optionally be set via an environment variable, API_PASSWORD | ||
| api_url | no | The full API url. Example: http://ENDPOINT:8080/devmgr/v2 This can optionally be set via an environment variable, API_URL | ||
| api_username | no | The username used to authenticate against the API. This can optionally be set via an environment variable, API_USERNAME | ||
| lun | no | The LUN number you wish to give the mapping If the supplied volume_name is associated with a different LUN, it will be updated to what is supplied here. | ||
| ssid | no | The storage system array identifier. | ||
| state | yes |
| Present will ensure the mapping exists, absent will remove the mapping. All parameters lun, target, target_type and volume_name must still be supplied. | |
| target | no | The name of host or hostgroup you wish to assign to the mapping If omitted, the default hostgroup is used. If the supplied volume_name is associated with a different target, it will be updated to what is supplied here. | ||
| target_type | no |
| Whether the target is a host or group. Required if supplying an explicit target. | |
| validate_certs | no | True | Should https certificates be validated? | |
| volume_name | yes | The name of the volume you wish to include in the mapping. |
Examples
---
- name: Lun Mapping Example
netapp_e_lun_mapping:
state: present
ssid: 1
lun: 12
target: Wilson
volume_name: Colby1
target_type: group
api_url: "{{ netapp_api_url }}"
api_username: "{{ netapp_api_username }}"
api_password: "{{ netapp_api_password }}"
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| msg | Status of mapping | always | string | Mapping existing |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/netapp_e_lun_mapping_module.html