Ansible stops service but doesn't restart it -
we deployed ansible in our different environments , i'm running problem can't find solution to.
on 2 servers have start , stop services becoming specific user.
su - itvmgr
then have run custom command stop , start services:
itvmgrctl stop dispatcher itvmgrctl start dispatcher
one of tasks looks this:
- name: "start dispatcher service" sudo_user: itvmgr command: su itvmgr -c '/itvmgr/bin/itvmgrctl start dispatcher' - name: pause pause: seconds=15
there's task stop looks 1 using stop
instead of start
.
the problem i'm running ansible stops service fine fails start service again. i'm not getting errors while it's running can't find reason why stop service fine, same command fails start it.
if has suggestions on how can troubleshoot problem appreciated.
perhaps start-script needs interactive shell or environment variables?