Odd issue with the service module - How to get more visibility?

Hi,
First off, wanted to say thanks to everyone involved for a pretty rockin tool.

I’m struggling with an issue that seemed to crop up out of nowhere that I am having trouble debugging. It is likely something I hosed up and don’t think this is a problem with ansible, but am looking for tips on how to get more details on what exactly the service module is doing.

This is the extent of the debug I am getting:
https://gist.github.com/ppearcy/8480777

Outside of hacking up the code or attaching the debugger, is it possible to figure out which exact commands the service module is calling? Or is there anymore debug information available? I think that would help me pinpoint the issue.

For the record the service in that gist does exist, does conform to the LSB standards, and can be stopped started via ansible with the command module.

Thanks!
Paul

Probably the service has no status option(not LSB required) and the service name does not match the executable.

Try using pattern= so the service module has something it can determine status from.

If that fails: export ANSIBLE_KEEP_REMOTE_FILES=1 and run the command, then you’ll have the full python script on the remote server and you can run in debug mode.

Brian Coca

Thank you Brian!

Both your tips were very helpful in showing why things were broken. The help is much appreciated.

Best Regards,
Paul

Btw, for anyone curious, the issue was that I accidentally created a directory at this location:
/usr/local/bin/service

Ansible was attempting to use this for the service executable. Both of Brian’s tips made this clear.

Thanks again!