Weird ansible-playbook behaviour when trying to start rabbitmq-server 2.8.2

I have a weird bug here and I don’t really know what’s causing the issue, maybe some of you have any ideas.

I have an Ubuntu 12.04 amd64 machine with the latest rabbitmq-server package installed (version 2.8.2 , from here ) and the rabbitmq-server process stopped ( /etc/init.d/rabbitmq-server stop after installing the package ).

I also have this playbook:

$ cat playbook

I replaced the start action with:

- name: start
action: shell /usr/sbin/service rabbitmq-server start ; sleep 2m

and the rabbitmq-server process stays alive as long as the sleep is active;
as soon as it's done, the process gets killed and I really can't figure out
what's happening.

Ok, so the rabbitmq script sounds like it cares very much about the
current directory, and when the current directory is gone, it blows
up. Please take this up with whoever maintains the distro init
script, because it's doing stupid things
and it should not care anything about the directory you first ran
/sbin/service in.

I also asked here on rabbitmq’s discuss list. I’ll dig into this as soon as I have some spare time, I’m really curious what’s causing it.

Cosmin