# Python API 2.0 Ansible Fail

**URL:** <https://forum.ansible.com/t/python-api-2-0-ansible-fail/25404>\
**Category:** Ansible Project\
**Created:** [September 5, 2017, 8:18am UTC](https://forum.ansible.com/t/python-api-2-0-ansible-fail/25404 "2017-09-05T08:18:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TranceWorldLogic](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@TranceWorldLogic](https://forum.ansible.com/u/TranceWorldLogic)\
**Post date:** [September 5, 2017, 8:18am UTC](https://forum.ansible.com/t/python-api-2-0-ansible-fail/25404/1 "2017-09-05T08:18:36Z")

</div>

Hi,

I was trying to invoke ansible plabook from python and got various blocker.  
1\> I have used dict formated data for ansible playbook tasks. And then tried to executed it working fine (as shown example in below link)  
e.g. at [http://docs.ansible.com/ansible/latest/dev\_guide/developing\_api.html](http://docs.ansible.com/ansible/latest/dev_guide/developing_api.html)

But I want to use module as “shell” now got a dead end how to provide argument to module as free-form text.  
Would you please help me with example ? (using dict as shown in example)

2\> I observe than python ansible module/library fail to load inventory from file. (It not even parsing that file).  
I think this is bug as like ymal is not handled. (Inventory INI file is not handled in python-anisble module/library)

Please help me to understand more about ansible library/module in python.

Thanks,  
~Rohit
