python script to run in playbook

hello all,

Greetings.

i was trying to run a python script in ansible playbook as below.

name: execute install script
script: parse.py

this works, but i want to use the generated output of script into inventory file.

could anyone please suggest how can i do this using ansible?