Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
how to use multiple key-value pairs in body of na_ontap_rest_api?
2023-11-30
01:32 PM
1,404 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have this functioning example of na_ontap_rest_api:
- name: run vserver cifs security modify aes-enabled-for-netlogon-channel true
netapp.ontap.na_ontap_rest_cli:
hostname: "{{ inventory_hostname }}"
username: "{{ lookup('env','NETAPP_USER') }}"
password: "{{ lookup('env','NETAPP_PASS') }}"
validate_certs: false
command: 'vserver/cifs/security'
verb: PATCH
params: { 'vserver': "{{ item.name }}" }
body: { 'aes-enabled-for-netlogon-channel': 'true' }
with_items:
- "{{ svm }}"
register: command_result
tags: [standard,command,cifs-security,new]
I want to do something similar with this CLI:
ldap client modify -vserver <vserver> -client-config exoduspoint_ad -ldaps-enabled true -port 636
What is the format for using multiple key-value pairs in the body? -- TIA!
Solved! See The Solution
1 ACCEPTED SOLUTION
SCL has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a standard JSON body so I would imagine this would work...
body: { "client-config": "exoduspoint_ad", "ldaps-enabled": true, "port": "636" }
2 REPLIES 2
SCL has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a standard JSON body so I would imagine this would work...
body: { "client-config": "exoduspoint_ad", "ldaps-enabled": true, "port": "636" }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @JohnChampion -- a comma-separated list worked but we cleaned it up a bit by doing this (different bloc snippet)
params: { 'vserver': "{{ item.name }}" }
body:
advertised-enc-types: ['aes-128','aes-256']
aes-enabled-for-netlogon-channel: true
is-signing-required: true
lm-compatibility-level: ntlmv2-krb
session-security-for-ad-ldap: seal
