Skip to content

Stouts/Stouts.supervisor

Repository files navigation

Stouts.supervisor

Build Status Galaxy Tag

Ansible role which manage supervisor

  • Install and manage supervisor
  • Install superlance
  • Manage supervisor tasks
  • Provide handlers for reload and restart supervisor

Variables

The role variables and default values.

supervisor_enabled: yes                   # The role is enabled
supervisor_version: "3.1.2"
supervisor_bindir: "/usr/local/bin"
supervisor_bin: "{{ supervisor_bindir }}/supervisord"
supervisor_pid: /var/run/supervisord.pid
supervisor_nofile: 65356                  # Set max opened files (set blank to default limits)
supervisor_cfgdir: /etc/supervisor        # path to config directory
supervisor_conf_file: "{{ supervisor_cfgdir }}/supervisord.conf"
supervisor_logdir: /var/log/supervisor    # path to logs directory
supervisor_incdir: "{{supervisor_cfgdir}}/conf.d" # path to include directory
supervisor_tasks: []                      # List of supervisor programs
                                          # Ex. supervisor_tasks:
                                          #       - name: <name>
                                          #         option: value
                                          #         option: value
                                          #         option: value
supervisor_events: []                     # similar to tasks/programs but for eventlisteners like crashmail
supervisor_groups: []                     # groups of tasks
supervisor_superlance: no                 # Install superlance (http://superlance.readthedocs.org/

Usage

Add Stouts.supervisor to your roles and set vars in your playbook file.

Example:

- hosts: all

  roles:
    - Stouts.supervisor

  vars:
    supervisor_tasks:
        - name: ping
          command: ping google.com
          autostart: true
          autorestart: true
    supervisor_events:
        - name: crashmail
          command: crashmail -p program -m [email protected]
          events: PROCESS_STATE_EXITED
    supervisor_groups:
        - name: my_group
          programs: ping

License

Licensed under the MIT License. See the LICENSE file for details.

Feedback, bug-reports, requests, ...

Are welcome!

If you wish to express your appreciation for the role, you are welcome to send a postcard to:

Kirill Klenov
pos. Severny 8-3
MO, Istra, 143500
Russia