�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z d d
l
m Z d d l j j Z e j � Z y d d l Z Wn e k
r� e Z n Xd e f d � � YZ d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys�
module: na_elementsw_ldap
short_description: NetApp Element Software Manage ldap admin users
extends_documentation_fragment:
- netapp.solidfire
version_added: '2.7'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Enable, disable ldap, and add ldap users
options:
state:
description:
- Whether the specified volume should exist or not.
required: true
choices: ['present', 'absent']
authType:
description:
- Identifies which user authentication method to use.
choices: ['DirectBind', 'SearchAndBind']
groupSearchBaseDn:
description:
- The base DN of the tree to start the group search (will do a subtree search from here)
groupSearchType:
description:
- Controls the default group search filter used
choices: ['NoGroup', 'ActiveDirectory', 'MemberDN']
serverURIs:
description:
- A comma-separated list of LDAP server URIs
userSearchBaseDN:
description:
- The base DN of the tree to start the search (will do a subtree search from here)
searchBindDN:
description:
- A dully qualified DN to log in with to perform an LDAp search for the user (needs read access to the LDAP directory).
searchBindPassword:
description:
- The password for the searchBindDN account used for searching
userSearchFilter:
description:
- the LDAP Filter to use
userDNTemplate:
description:
- A string that is used form a fully qualified user DN.
groupSearchCustomFilter:
description:
- For use with the CustomFilter Search type
su
- name: disable ldap authentication
na_elementsw_ldap:
state: absent
username: "{{ admin username }}"
password: "{{ admin password }}"
hostname: "{{ hostname }}"
- name: Enable ldap authentication
na_elementsw_ldap:
state: present
username: "{{ admin username }}"
password: "{{ admin password }}"
hostname: "{{ hostname }}"
authType: DirectBind
serverURIs: ldap://svmdurlabesx01spd_ldapclnt
groupSearchType: MemberDN
userDNTemplate: uid=%USERNAME%,cn=users,cn=accounts,dc=corp,dc="{{ company name }}",dc=com
s
N( t
AnsibleModule( t to_nativet NetappElementLdapc B` s5 e Z d � Z d � Z d � Z d � Z d � Z RS( c C` s t j � | _ | j j d t d d d t d d d g � d t d d d d d
g � d t d d � d t d d d d
d d g � d t d d � d t d d � d t d d � d t d d d t � d t d d � d t d d � d t d d � � t d | j d t � | _ | j j } | d | _ | d | _
| d | _ | d | _ | d | _
| j
d k r�| j
j d � | _
n | d | _ | d | _ | d | _ | d | _ | d | _ | d | _ t t k r�| j j d d � n t j d | j � | _ d S( Nt statet typet strt requiredt choicest absentt presentt authTypet
DirectBindt
SearchAndBindt groupSearchBaseDnt groupSearchTypet NoGroupt ActiveDirectoryt MemberDNt
serverURIst userSearchBaseDNt searchBindDNt searchBindPasswordt no_logt userSearchFiltert userDNTemplatet groupSearchCustomFiltert
argument_spect supports_check_modet ,t msgs) Unable to import the SolidFire Python SDKt module( t netapp_utilst ontap_sf_host_argument_specR"