Passing ldapServers to ldap_client_create

15 views
Skip to first unread message

Gene DiCesare

unread,
May 6, 2021, 10:34:30 AM5/6/21
to Ansible Project
Hi,

I am having issues using the SDK module ldap_client_create via the zapit module. In particular, trying to pass a list of LDAP servers seems to experience two issue which I can not figure out...

First, the SDK Doc I have shows the parameter should be a string[] type:

     ldap_client_create
        Input Name:    ldap_servers
        Type:          string[] optional
        Description:   List of LDAP Servers to use for this configuration.

I've tried numerous ways to pass the data, but the current status is as follows:

...
 vars:
    ldapservers:
      - ldapserver1.xyz.com
      - ldapserver2.xyz.com
      - ldapserver3.xyz.com
...
  - name: LDAP Client Creation
      na_ontap_zapit:
        <<: *login
        vserver: vserver-name
        zapi:
          ldap-client-create:
            ldap-client-config: vserver-name-cc
            ldap-servers: "{{ ldapservers }}"
            ...
      register: output
    - debug: var=output

I get the following error:

fatal: [localhost]: FAILED! => {"changed": false, "errno": "13115", "msg": "ZAPI failure: check errno and reason.", "reason": "Unexpected array element: ldapserver1.xyz.com; Unexpected array element: ldapserver2.xyz.com; Unexpected array element: ldapserver3.xyz.com", "response": {}, "status": "failed"}

I also found if I pass an IP address anyplace in the list of names, I get a different message:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Invalid tag name '111.222.333.444'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last)
...

Does anyone have insight into how to properly pass this information?

Thanks.

Reply all
Reply to author
Forward
0 new messages