Re: [ansible-project] Reload in supervisorctl

1,627 views
Skip to first unread message

Michael DeHaan

unread,
Sep 21, 2012, 8:35:05 AM9/21/12
to ansible...@googlegroups.com, ansible...@googlegroups.com
@mattupstate and others, any thoughts?

-- Michael

On Sep 20, 2012, at 9:47 PM, keith <keith...@gmail.com> wrote:

> Hello,
>
> Ansible is just great. Configuration as data rather than code makes so much sense. Thanks so much for it.
>
> I want to be able to update the conf of a program that has been already been started with the supervisorctl module, and then restart the program so that it runs with the new configuration.
>
> I don't want to restart supervisord since it will take down any other processes it is controlling.
>
> I am doing this now by rewriting the conf and then shelling to "supervisorctl reread" and then restarting the program, but I'd much rather do something like "state=current_conf" in the supervisorctl module and then restart, though it be would rather hard to give feedback on whether there was a change in the conf within the running supervisord - perhaps just rely on the change status when updating the conf file for triggering handlers.
>
> Does this make sense as a feature or am I missing how it can be done cleanly (without shelling) already? I can add and merge back if it does make sense.
>
> Keith
>
>

Matt Wright

unread,
Sep 21, 2012, 2:08:29 PM9/21/12
to ansible...@googlegroups.com
Hi Keith,

Here's an example of a simple playbook that writes the config file for supervisor and restarts the process via supervisorctl:


The playbook was written as part of small project/tutorial that I wrote. You can read more about it here:


Hope that helps.

-M
Reply all
Reply to author
Forward
0 new messages