Giter VIP home page Giter VIP logo

stouts.supervisor's Introduction

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

stouts.supervisor's People

Contributors

fengluo avatar javaguirre avatar klen avatar yamikep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stouts.supervisor's Issues

reread task error:

Hi,

Very nice Ansible script. Good job. Thank you.

I have an issue with the "supervisor reread" task. See below. Do you have this issue?
If I reboot my machine, supervisor works though, there is no issue.

NOTIFIED: [rolebooks/stouts.supervisor | supervisor reread] *******************
failed: [10.0.0.52] => {"changed": true, "cmd": "/usr/local/bin/supervisorctl -c /etc/supervisor/supervisord.conf reread && /usr/local/bin/supervisorctl -c /etc/supervisor/supervisord.conf update", "delta": "0:00:00.082186", "end": "2014-10-09 13:14:07.183563", "rc": 2, "start": "2014-10-09 13:14:07.101377"}
stdout: error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224

Do you need to do a "reread" if you restart supervisor anyway?

  notify:
    - supervisor reread
    - supervisor restart

Thanks

Error on Ubuntu 16.04 Xenial

TASK [Stouts.supervisor : Enable supervisor service (Debian) - pt. 3] **********
skipping: [192.168.10.10]

TASK [Stouts.supervisor : Ensure the supervisor is started] ********************
fatal: [192.168.10.10]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service \"'supervisor'\": "}

While the prior task seems to enable the service on Debia, I'm guessing this has something to do with systemd?

Do not embed python pip installation or make it optional

This role is very cool, except that it forces us to install pip using python-pip package
this is a mess when we use rules from which pip is installed with an other method (get-pip.py for instance)
pip installation should be optional (replaced by a fail that checks pip already exist)

There are some problems on Debian 8.1.0

TASK: [Stouts.supervisor | Ensure the supervisor is started] ******************
<127.0.0.1> REMOTE_MODULE service name=supervisor state=started
failed: [default] => {"failed": true}
msg: Failed to start supervisor.service: Unit supervisor.service failed to load: No such file or directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.