NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

ONTAP Rest API Discussions

Ansible na_ontap_rest_cli

Assen_A
2,699 Views

Looking for to initiate  vserver/cifs/domain/descovered-servers/rest-servers  via module: na_ontap_rest_cli

note: na_ontap_comand module works fine (to achieve the same)) however I am looking for  to only use 'rest'

 

 

 

1 ACCEPTED SOLUTION

Assen_A
2,678 Views
Used get-dc-info instead of rest-servers to get from "state": "undetermined" to "state": "ok" 
From: 
CLI:>  vserver cifs domain discovered-servers show -vserver XYZ
Output: 
Domain Name Type Preference DC-Name DC-Address Status
--------------- -------- ---------- --------------- --------------- ---------
xxxx                 yyyy     yyyy      nnnn             nnnnn          undetermined
- name: check access authentication to AD DC
 
To: 
CLI:>  vserver cifs domain discovered-servers show -vserver XYZ
Output: 
Domain Name Type Preference DC-Name DC-Address Status
--------------- -------- ---------- --------------- --------------- ---------
xxxx                 yyyy     yyyy      nnnn             nnnnn          OK
 playbook task: 
- name: check access authentication to AD DC
  netapp.ontap.na_ontap_rest_cli:
      command: 'vserver/services/access-check/authentication/get-dc-info'  
      verb: 'POST'
      body: {vserver: "{{ vserver_name }}"}
      <<: *login
    register: result_cifs_check_access

View solution in original post

1 REPLY 1

Assen_A
2,679 Views
Used get-dc-info instead of rest-servers to get from "state": "undetermined" to "state": "ok" 
From: 
CLI:>  vserver cifs domain discovered-servers show -vserver XYZ
Output: 
Domain Name Type Preference DC-Name DC-Address Status
--------------- -------- ---------- --------------- --------------- ---------
xxxx                 yyyy     yyyy      nnnn             nnnnn          undetermined
- name: check access authentication to AD DC
 
To: 
CLI:>  vserver cifs domain discovered-servers show -vserver XYZ
Output: 
Domain Name Type Preference DC-Name DC-Address Status
--------------- -------- ---------- --------------- --------------- ---------
xxxx                 yyyy     yyyy      nnnn             nnnnn          OK
 playbook task: 
- name: check access authentication to AD DC
  netapp.ontap.na_ontap_rest_cli:
      command: 'vserver/services/access-check/authentication/get-dc-info'  
      verb: 'POST'
      body: {vserver: "{{ vserver_name }}"}
      <<: *login
    register: result_cifs_check_access
Public