I'm trying to restart Supervisor through my Ansible Playbook but I seem to be stumbling into an issue with the supervisor module for Ansible.
In my Supervisor config I have defined a program:
[program:process]
process_name=%(program_name)s_%(process_num)02d
command=/home/box1/workers/bin/process
numprocs=64
directory=/home/box1/workers/bin
autostart=true
autorestart=true
startretries=5
stderr_logfile=/tmp/%(program_name)s-err.log
stdout_logfile=/tmp/%(program_name)s-out.log
user=root
And this works fine. However, when I try to restart Supervisor through Ansible I get the following error:
failed: [box1] => {"failed": true}
msg: program:process: ERROR (no such process)
program:process: ERROR (no such process)
My Ansible task configuration looks like this:
- name: Restart Supervisor
sudo: yes
supervisorctl: name=program:process state=restarted config=/etc/supervisor/supervisord.conf
For the name
parameter I have tried program:process
, program
, program:
and process
but none seem to work. I'm currently on Ansible 1.5.4.