On this page
netapp_eseries.santricity.netapp_e_lun_mapping – NetApp E-Series create, delete, or modify lun mappings
Note
This plugin is part of the netapp_eseries.santricity collection (version 1.2.13).
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 netapp_eseries.santricity.
To use it in a playbook, specify: netapp_eseries.santricity.netapp_e_lun_mapping.
New in version 2.2: of netapp_eseries.santricity
Synopsis
- Create, delete, or modify mappings between a volume and a targeted host/host+ group.
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| api_password
        
        string / required
         | 
      
        
        The password to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API.
         | 
     |
| api_url
        
        string / required
         | 
      
        
        The url to the SANtricity Web Services Proxy or Embedded Web Services API. Example https://prod-1.wahoo.acme.com/devmgr/v2
         | 
     |
| api_username
        
        string / required
         | 
      
        
        The username to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API.
         | 
     |
| lun
        
        integer
        
       
        added in 2.7 of netapp_eseries.santricity
         | 
      
        
        The LUN value 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.
        
       
        LUN value will be determine by the storage-system when not specified.
         | 
     |
| ssid
        
        string
         | 
      Default: 
        1
         | 
      
        
        The ID of the array to manage. This value must be unique for each array.
         | 
     
| state
        
        string / required
         | 
      
       
  | 
      
        
        Present will ensure the mapping exists, absent will remove the mapping.
         | 
     
| target
        
        string
         | 
      
        
        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
        
        string
        
       
        added in 2.7 of netapp_eseries.santricity
         | 
      
       
  | 
      
        
        This option specifies the whether the target should be a host or a group of hosts
        
       
        Only necessary when the target name is used for both a host and a group of hosts
         | 
     
| validate_certs
        
        boolean
         | 
      
       
  | 
      
        
        Should https certificates be validated?
         | 
     
| volume_name
        
        string / required
         | 
      
        
        The name of the volume you wish to include in the mapping.
        
       aliases: volume  | 
     
Notes
Note
- The E-Series Ansible modules require either an instance of the Web Services Proxy (WSP), to be available to manage the storage-system, or an E-Series storage-system that supports the Embedded Web Services API.
 - Embedded Web Services is currently available on the E2800, E5700, EF570, and newer hardware models.
 - M(netapp_e_storage_system) may be utilized for configuring the systems managed by a WSP instance.
 
Examples
---
    - name: Map volume1 to the host target host1
      netapp_e_lun_mapping:
        ssid: 1
        api_url: "{{ netapp_api_url }}"
        api_username: "{{ netapp_api_username }}"
        api_password: "{{ netapp_api_password }}"
        validate_certs: no
        state: present
        target: host1
        volume: volume1
    - name: Delete the lun mapping between volume1 and host1
      netapp_e_lun_mapping:
        ssid: 1
        api_url: "{{ netapp_api_url }}"
        api_username: "{{ netapp_api_username }}"
        api_password: "{{ netapp_api_password }}"
        validate_certs: yes
        state: absent
        target: host1
        volume: volume1
  Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
| msg
        
        string
         | 
      always | 
        
        success of the module
         Sample:
        
       
        Lun mapping is complete
         | 
     
Authors
- Kevin Hulquest (@hulquest)
 - Nathan Swartz (@ndswartz)
 
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/latest/collections/netapp_eseries/santricity/netapp_e_lun_mapping_module.html