You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hi…
it assume that the mysql_user module is slightly buggy because it claims
"changed=1" after a privileges change although nothing was changed. But
I don't just like to complain but instead debug the module and see if I
can provide a fix. So far I have git-clone'd
g...@github.com:ansible/ansible.git (recursively) and set
I have copied the mysql_user.py to mysql_user2.py and started debugging.
However I wonder how I can debug the module. pdb didn't work as
expected. And neither STDOUT nor STDERR can be used. I even tried to
write to a "/tmp/debug" file but somehow even that didn't show anything.
So I wonder how developers actually debug their code. Hints welcome.
Thanks
…Christoph
Brian Coca
unread,
Apr 17, 2015, 1:26:01 PM4/17/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
In the ansible repo you can find the hacking/test-module script that
allows you to run/test a module and even attach a debugger to the run.
Other ways some people use is setting ANSIBLE_KEEP_REMOTE_FILES=1 and
using the resulting temporary files as python scripts under a
debugger.
One note with mysql, the latest version has made some backward
incompatible changes so and not all the module code paths have been
adjusted for that.