https://github.com/ansible/ansible/issues/17716
I have been post my questions in here.
now I found I used official api example, it will also create tmp files and not delete it.
http://docs.ansible.com/ansible/developing_api.html
but if i use ansible-playbook,it 's normal.
`
ansible-playbook test.yml
`
the tmp files in here:
`
$ ~/.ansible/tmp# ls
`
by the way, i use ansible_2.2.0
I hope it is user question, because it means it can be solve