ansible-collections / netapp.ontap

Ansible collection to support NetApp ONTAP configuration.
https://galaxy.ansible.com/netapp/ontap
GNU General Public License v3.0
55 stars 35 forks source link

Name variable for NetApp Ontap Ansible na_ontap_ldap_client module #172

Closed seenkail closed 8 months ago

seenkail commented 1 year ago

Summary

As NetApp ZAPI coming end of life after ontap version 9.13.1, how we are going to use "name" variable in na_ontap_ldap_client as name variable is supported only in ZAPI.

Name variable is a key value in ldap client creation as it's a ldap client config name which must be there in order for the configuration to be successful.

Component Name

na_ontap_ldap_client

Ansible Version

$ ansible --version
ansible [core 2.12]

ONTAP Collection Version

$ ansible-galaxy collection list
Collection          Version
------------------- -------
netapp.cloudmanager 21.22.0
netapp.ontap        22.7.0

ONTAP Version

NetApp Release 9.13.1: Mon Jun 19 13:36:41 UTC 2023

Playbook

- name: Create LDAP client
      tags: ldap
      ignore_errors: yes
      netapp.ontap.na_ontap_ldap_client:
        vserver:          "{{ VSERVER }}"
        state:            present
        name:             "{{ CLIENT_LONG_NAME + '.client.com'}}"
        ldap_servers:     "{{ LDAP|json_query(CLUSTER[0:3]|upper) }}"
        base_dn:          "{{ 'o=' + CLIENT_LONG_NAME + '.client.com,dc=dc,dc=com' }}"
        bind_dn:          "{{ 'cn=proxyagent,ou=profile,o=' + client + '.client.com,dc=dc,dc=com' }}"
        bind_password:    "password"
        schema:           "RFC-2307"
        min_bind_level:   simple
        port:   636
        ldaps_enabled:   yes
        use_rest: always
        <<: *login_pri_cluster

Steps to Reproduce

when we run the playbook using ZAPI we give the Name variable for client config. If we just go for use_rest : always , Name variable can't be used as its available only zapi. Since there is no Name variable in rest for na_ontap_ldap_client, Task creates the Client config name as vserver name , that's not a valid configuration . We need to specify the client config name for a valid configuration. Can we enhance this

Expected Results

Client config name should be something we give not the vserver name itself

Actual Results

Client config name should be something we give not the vserver name itself
carchi8py commented 1 year ago

@seenkail i would reach out to the ONTAP REST API team on Netapp discord channel on this.

Currently the POST for LDAP does not support a name. https://library.netapp.com/ecmdocs/ECMLP2885799/html/#/name-services/ldap_create