Hi Team
Please help me how to divide bulk chunk data in to small chunks so small chunks update to the snow api.
below is my playbook and my data is in EPG_all variable there would be some 5000 lines of data .
how i can divide this data into small chunks and pass to snow table .
-
name: Query all EPGs
aci_epg:
host: “{{hostname}}”
username: “{{user}}”
password: “{{pass}}”
validate_certs: no
use_proxy: no
state: query
delegate_to: localhost
register: result -
set_fact:
EPG: “{{ result | to_json }}” -
set_fact:
EPG_all: “{{ result | json_query(‘current[*].fvAEPg.attributes.dn’)| list | sort }}” -
debug:
var: EPG_all -
name: Passing Data to Snow
uri:
url: “https://testing1.service-now.com/api/eplc/update_integration/create”
method: POST
body: ‘{“List”:{{EPG_all}}, “Region”:“NA - test” }’
body_format: json
user: “{{ snow_user }}”
password: “{{ snow_pass }}”
force_basic_auth: yes
status_code: 200
timeout: 100
appreciate your help in advanced