# newbie: Error while running Ansible API from the doc

**URL:** <https://forum.ansible.com/t/newbie-error-while-running-ansible-api-from-the-doc/21465>\
**Category:** Ansible Project\
**Created:** [May 17, 2016, 9:36pm UTC](https://forum.ansible.com/t/newbie-error-while-running-ansible-api-from-the-doc/21465 "2016-05-17T21:36:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aprameya\_NDS](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Aprameya\_NDS](https://forum.ansible.com/u/Aprameya_NDS)\
**Post date:** [May 17, 2016, 9:36pm UTC](https://forum.ansible.com/t/newbie-error-while-running-ansible-api-from-the-doc/21465/1 "2016-05-17T21:36:19Z")

</div>

Hi,

I am a newbie to the Ansible Python API thing and i am trying out to run the code given in the Ansible Python API documentation (Link: [http://docs.ansible.com/ansible/developing\_api.html](http://docs.ansible.com/ansible/developing_api.html) Python API 2.0)

I get the following error:

PLAY [Ansible Cli PoC] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

> /usr/lib/python2.6/site-packages/ansible/plugins/connection/ssh.py(537)\_run()  
> → if C.HOST\_KEY\_CHECKING:  
> (Epdb) c  
> fatal: [172.16.0.234]: FAILED! =\> {“failed”: true, “msg”: **“using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE\_SSH\_ARGS="" (or ssh\_args in [ssh\_connection] section of the config file) before running again”}**

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
cleanup  
\<ansible.executor.task\_queue\_manager.TaskQueueManager object at 0x116dc10\>

Can you please let me know how to proceed with this?
