I am testing out rest cli to replace na_ontap_command, but I am a bit puzzled on when should I put in params and when to put in body.
Use below example, seems both can work:
- name: copy policy
connection: local
netapp.ontap.na_ontap_rest_cli:
<<: *login
use_rest: always
command: "vserver/export-policy/copy"
verb: "PATCH"
params:
vserver: "{{ svm }}"
policyname: policy1
body:
newvserver: "{{ svm }}"
newpolicyname: policy2
tags: policy
vs
- name: copy policy
connection: local
netapp.ontap.na_ontap_rest_cli:
<<: *login
use_rest: always
command: "vserver/export-policy/copy"
verb: "PATCH"
params:
vserver: "{{ svm }}"
policyname: policy1
newvserver: "{{ svm }}"
newpolicyname: policy2
tags: policy
They both work. But I think in other scenarios, they may not. Is there guidelines?