jebovic.supervisor
Supervisor
This tool helps you install and set up Supervisor, and you can add your own programs using simple YAML settings.
This role is part of my OPS project. You can check it out from this link. OPS includes many useful things, like a Vagrant file for development virtual machines, playbooks for managing roles, inventory files, role configuration examples, an Ansible configuration file, and much more.
Compatibility
Tested and works with:
- Debian Jessie (8 and above)
- Ubuntu Trusty (14.04 LTS)
- Ubuntu Xenial (16.04 LTS)
Role Settings
# Supervisor installation settings
supervisor_packages:
- supervisor
supervisor_pip_packages:
- superlance
# Basic Supervisor settings
supervisor_user: root
supervisor_socket: /tmp/supervisor.sock
supervisor_pidfile: /var/run/supervisord.pid
supervisor_log_path: /var/log/supervisord
supervisor_log_file: "{{ supervisor_log_path }}/supervisord.log"
supervisor_http_host: "{{ ansible_host }}"
supervisor_http_port: 9988
supervisor_http_username: supervisor_user
supervisor_http_password: supervisor
# Programs to manage with Supervisor
supervisor_programs: []
# Supervisor events
supervisor_events: []
Example Playbook
- hosts: servers
roles:
- { role: jebovic.supervisor }
Example Configuration
# Supervisor UI IP & port settings
supervisor_user: supervisor
supervisor_http_host: 127.0.0.1
supervisor_http_port: 9988
# Supervisor programs configuration
supervisor_programs:
traefik:
command: "{{ traefik_bin_path }} -c {{ traefik_config_dir }}/traefik.toml"
autostart: "true"
autorestart: "true"
stderr_logfile: "{{ supervisor_log_path }}/traefik-stderr.log"
stderr_logfile_maxbytes: 1MB
stderr_logfile_backups: 10
stdout_logfile: "{{ supervisor_log_path }}/traefik-stdout.log"
stdout_logfile_maxbytes: 1MB
stdout_logfile_backups: 10
user: root
consul:
command: "{{ consul_bin_path }} agent -ui -bind={{ ansible_host }} -client=0.0.0.0 -node={{ ansible_fqdn }} -bootstrap -server -http-port {{ consul_http_port }} -data-dir={{ consul_data_dir }} -config-dir={{ consul_config_dir }} -domain={{ ansible_fqdn }}."
autostart: "true"
autorestart: "true"
stderr_logfile: "{{ supervisor_log_path }}/consul-stderr.log"
stderr_logfile_maxbytes: 1MB
stderr_logfile_backups: 10
stdout_logfile: "{{ supervisor_log_path }}/consul-stdout.log"
stdout_logfile_maxbytes: 1MB
stdout_logfile_backups: 10
user: root
mailhog:
command: /usr/local/bin/mailhog -api-bind-addr :8025 -ui-bind-addr :8025
autostart: "true"
autorestart: "true"
stderr_logfile: "{{ supervisor_log_path }}/mailhog-stderr.log"
user: www-data
# Supervisor events configuration (requires superlance plugin)
supervisor_events:
httpok:
command: httpok -p mailhog http://localhost:8025
events: TICK_60
Tags
- supervisor_config: updates the configuration and restarts the service
License
MIT
Author Information
Jérémy Baumgarth GitHub Profile
Informazioni sul progetto
Install and configure supervisor, you can add your own programs with yaml variables
Installa
ansible-galaxy install jebovic.supervisor
Licenza
mit
Download
2.8k
Proprietario