ONTAP Rest API Discussions

Ansible na_ontap_rest_cli

Assen_A
1,714 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
1,693 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
1,694 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