# Steps to insert data into a database

**URL:** <https://forum.ansible.com/t/steps-to-insert-data-into-a-database/19912>\
**Category:** Ansible Project\
**Created:** [December 1, 2015, 8:30pm UTC](https://forum.ansible.com/t/steps-to-insert-data-into-a-database/19912 "2015-12-01T20:30:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugh\_Ma](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@Hugh\_Ma](https://forum.ansible.com/u/Hugh_Ma)\
**Post date:** [December 1, 2015, 8:30pm UTC](https://forum.ansible.com/t/steps-to-insert-data-into-a-database/19912/1 "2015-12-01T20:30:54Z")

</div>

Currently the playbook runs a task which generates a result file in /tmp/result.out  
Then it runs a parsing python script I put in common/files/parser.py and passes /tmp/result.out to the script as a parameter. The script prints to STDOUT the parsed results in a JSON format as such

{  
“elapsed\_time”: “5”,  
“foo”: “bar”  
“foos”: { “afoo”: “abar”}  
}

Everything here works. So now how do I go from this to being able to put the above JSON string into a nosql database such as mongodb or orientdb?
