ansible-supervisor
ansible-supervisor copied to clipboard
an ansible role for installing & running supervisord
This repository is an ansible role for installing a supervisor daemon, with a focus on being simple & usable without root.
Because of this it installs the supervisor utility into a virtualenv instead of into the systems python like many system packages do. Hopefully in the future this will be configurable
Requirements:
- virtualenv
You can use {{ pip_args }}
if you have special pip set-up, like an in-house pypi.
Installation:
Just check out this repository and add the checkout location to your roles_path in your ansible.cfg
ansible-galaxy install eggsby.supervisor
Usage:
roles:
- role: eggsby.supervisor
supervisor_home: ~/apps/supervisor
This will ensure a supervisor daemon is installed and running in the context you run the role in.
supervisorctl: name=webserver state=restarted supervisorctl_path=~/bin/supervisorctl
Or use the convenient supervise role to install & supervise your daemons. See the example project for an complete demonstration.
Configuration
You can control where supervisor installs, what version it installs, who it installs as, and any special installation options.
It installs shell scripts for accessing the supervisor using supervisorctl -c path-to.conf
-- you can control the path using bin_dir
Or you can just let the defaults do their thing.
See supervisord and the ansible supervisorctl module for more information.
Compatibility
Previous versions had a super_args
which preconfigured the ansible supervisorctl module, the functionality this relied on was removed from ansible, so if migrating from an older version you should instead use supervisorctl_path
.
Enjoy