You might also want to read this post http://michaeldehaan.net/post/35403909347/tips-on-using-debuggers-with-ansible
J. On Monday, June 9, 2014 7:24:27 AM UTC-7, James Cammarata wrote: > > This is more of a topic for ansible-devel, but to answer your question you > can use the hacking/test-module script to run your module. At that point, > you can either use print statements or epdb to debug your code, since it's > running locally. If you only want to test your module remotely (ie. a > normal ansible run), you can always use the built-in syslog functionatliy. > > Normally you should not use print statements because it breaks the JSON > output. > > > On Mon, Jun 9, 2014 at 9:09 AM, <[email protected] <javascript:>> wrote: > >> According to this: http://docs.ansible.com/developing_modules.html, it >> said... >> >> You should also never do this in a module: >> >> print "some status message" >> >> >> So, how to debug or log message during the development of Ansible module? >> >> Thanks >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/b9e18a9b-f079-4cac-85c8-fd6bb545c2fb%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/b9e18a9b-f079-4cac-85c8-fd6bb545c2fb%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/eb026168-c632-406f-b3d4-309b17eef35e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
