#missing required arguments: command_directory_name

1 messages · Page 1 of 1 (latest)

steel oar
#

I'm trying to create a user and role using REST_API, and I'm running 9.15.x and keep receiving the following error when running the playbook: localhost]: FAILED! => {"changed": false, "msg": "missing required arguments: command_directory_name"} Why am I receiving this error if I'm only trying to apply REST and the error above is only valid for ZAPI? I'm only providing a snippet of the playbook since I'm sure you don't want the entire playbook posted here.

I have shortened the playbook as much as possible, and I still receive that error even if I only apply "/api" to just give the user all REST permissions, but still the same error.
I'm using netapp.ontap version 22.13.0.

privileges: - path: /api/storage/volumes access: all - path: /api/storage/luns access: all - path: /api/protocols/nfs/export-policies https: true validate_certs: false use_rest: always

steel oar
#

I'm under the impression, Even with valid REST path values, the na_ontap_user_role module from the netapp.ontap collection:

Still defaults to ZAPI transport internally unless the module detects REST support at both the module level and the ONTAP endpoint — which is flaky.

This seems like a bug to me but maybe it's fixed in a newer module?

The paths all look fine to me:

 privileges:
          - path: /api/storage/volumes
            access: all
          - path: /api/storage/luns
            access: all
          - path: /api/protocols/nfs/export-policies
        https: true
        validate_certs: false
        use_rest: always

I was trying to use the following:

/api/storage/volumes
/api/storage/luns
/api/protocols/nfs/export-policies
/api/protocols/cifs/shares
/api/network/ip/interfaces
/api/svm/svms
/api/storage/aggregates
/api/cluster
/api/storage/qtrees
/api/storage/quota/rules
/api/security/accounts
/api/security/certificates
/api/snapmirror/relationships
/api/snapmirror/policies
/api/cluster/software
/api/cluster/software/history
/api/storage/volumes/snapshots
/api/network/ip/
/api/svm/
steel oar
#

Anyone have an update on this topic or anything they can share?

steel oar
#

@hardy roost Any thought or suggestions?

hardy roost
#

@willow cedar Can you assist here?

willow cedar
#

@steel oar what version of the collection are you using. And could you share the entire playbook if possible.

#

nm i see the version, can you send me the playbook. Something weird seem to have going on here. Privilege is rest only and command_directory_name is Zapi only so the option check should be failing for one of these before the options check.

steel oar
#

Yeah let me get that to you in a short few

steel oar
steel oar
#

@willow cedar Uploaded

steel oar
#

@willow cedar Any thoughts?

willow cedar
#

Sorry i missed this before i went on PTO. @vivid spruce could you look to see what going on here.

open bear
#

@tropic obsidian

tropic obsidian
#

hi @steel oar
I just tested with a subset of above mentioned privileges and the module created the user role as expected with collection version 23.0.0

    - name: Create user role - REST
      netapp.ontap.na_ontap_user_role:
        state: present
        vserver: "{{vserver}}"
        privileges:
          - path: /api/storage/volumes
            access: all
          - path: /api/storage/luns
            access: all
        name: test_role
        use_rest: always
      register: result