Sigh, user error. For reasons I will never know I named my plugin with the 
.yml extension instead of .py.

But, on the upside, I got to find out just how incredibly well the the 
Intellij debugger works with python. 

For those interested:

1) Create a run configuration. In my case it was like:

script: /usr/local/bin/ansible-playbook
script params: -i inventory/aws/ops playbooks/provision/aws/prometheus.yml 
-u ubuntu
working dir: /Users/bkaplan/si/ops/ansible

2) open the ansible file you want to debug in idea. You can do this however 
you want. I create use the Tools/Create Command  Line Laucher menu to 
create an 'idea' script in /usr/local/bin. Then just use $ idea <myfile.py> 
to open the file in the running Intellij

3) Set the breakpoint in the opened file

4) Start the run configuration in debug mode. Idea will find all the other 
files in the stack as well.

If you never used idea's debugger you will be blown away. Its by far the 
best debugger I have ever used in my 30 years of software development. 

After having use 'module.fail_json' for debugging these last weeks I will 
no longer dread debugging modules.

-- 
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/c6c45811-2a39-4d20-8a55-a33b25a7401e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to