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

**URL:** <https://forum.ansible.com/t/odd-issue-with-the-service-module-how-to-get-more-visibility/14372>\
**Category:** Ansible Project\
**Created:** [January 17, 2014, 8:30pm UTC](https://forum.ansible.com/t/odd-issue-with-the-service-module-how-to-get-more-visibility/14372 "2014-01-17T20:30:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Pearcy](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@Paul\_Pearcy](https://forum.ansible.com/u/Paul_Pearcy)\
**Post date:** [January 17, 2014, 8:30pm UTC](https://forum.ansible.com/t/odd-issue-with-the-service-module-how-to-get-more-visibility/14372/1 "2014-01-17T20:30:35Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [January 17, 2014, 9:08pm UTC](https://forum.ansible.com/t/odd-issue-with-the-service-module-how-to-get-more-visibility/14372/2 "2014-01-17T21:08:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Paul\_Pearcy](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@Paul\_Pearcy](https://forum.ansible.com/u/Paul_Pearcy)\
**Post date:** [January 22, 2014, 7:18pm UTC](https://forum.ansible.com/t/odd-issue-with-the-service-module-how-to-get-more-visibility/14372/3 "2014-01-22T19:18:46Z")

</div>

Thank you Brian!

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

Best Regards,  
Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Pearcy](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@Paul\_Pearcy](https://forum.ansible.com/u/Paul_Pearcy)\
**Post date:** [January 22, 2014, 8:38pm UTC](https://forum.ansible.com/t/odd-issue-with-the-service-module-how-to-get-more-visibility/14372/4 "2014-01-22T20:38:32Z")

</div>

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!
