GithubHelp home page GithubHelp logo

haxoza / ansible-supervisor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vinelab/ansible-supervisor

0.0 2.0 0.0 155 KB

An Ansible playbook role to install supervisord on CentOS/Red Hat/Fedora

License: MIT License

ansible-supervisor's Introduction

Ansible Supervisor

A playbook role to install and configure supervisord and supervisorctl on Centos/Red Hat/Fedora with Ansible

Installation

Dependencies

Install

  • Clone this repository inside your roles directory as supervisor or add it as a submodule: git submodule add [email protected]:Vinelab/ansible-supervisor roles/supervisor

  • In ansible.cfg make sure that hash_behavior = merge under [defaults]

  • In your playbook:

roles:
  - supervisor

Synopsis

Supervisor will be installed using python's easy_install that is included in the setup tools.

Usage

hash_behavior must be set to merge in your ansible.cfg under [defaults]

Programs

vars:

  supervisor:
    programs:
      - file: web.ini
        name: nginx
        values:
          - command: /usr/sbin/nginx
      - file: web.ini
        name: php-fpm
        values:
          - command: /usr/bin/php-fpm
          - autostart: "true"
      - file: db.ini
        name: redis
        values:
          - command: /usr/init.d/redis start
      - files: queue.ini
        name: queue-sync
        values:
          - directory: /var/www/app
          - command: /usr/bin/php artisan queue:listen --queue=sync --sleep=20

you can have anything in the values section since the dictionary key will represent the option and the value will be the option's value.

Http Server

Configuring the http server credentials

hash_behavior must be set to merge in your ansible.cfg under [defaults]

supervisor:
  http:
    username: custom_username
    password: 123passwd

Optional Configuration

You may override any of the default supervisord configuration set by adding any of the following variables.

hash_behavior must be set to merge in your ansible.cfg under [defaults]

supervisor:
  runtime:
    dir: /var/run/supervisor
    nodaemon: "false"
    socket: supervisord.sock
    pidfile: supervisord.pid

  config:
    dir: /etc/supervisord.d
    file: /etc/supervisord.conf
    default: /etc/default.supervisord.conf

  log:
    dir: /var/log/supervisord
    file: supervisord.log
    level: info

  http:
    file: status.ini
    port: 127.0.0.1:9002
    username: user
    password: 123

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.