how to debug an ansible module

Hi Guys,

how to debug an ansible module ? I find http://docs.ansible.com/ansible/dev_guide/developing_modules.html, but failed to run it as following.

how do you do testing when develop one module ?

[root@server120 ansible-module]# ansible/hacking/test-module -m ./kolla_docker.py

  • including generated source, if any, saving to: /root/.ansible_module_generated
  • ansiballz module detected; extracted module source to: /root/debug_dir

Hi Margin,

I usually use an IDE like PyCharm for this. I have detailed it here:
https://github.com/mmumshad/debug-ansible-modules-pycharm

Thanks
Mumshad