{"id":21400263,"url":"https://github.com/oefenweb/ansible-supervisor","last_synced_at":"2025-07-13T21:31:13.746Z","repository":{"id":29412008,"uuid":"32947512","full_name":"Oefenweb/ansible-supervisor","owner":"Oefenweb","description":"Ansible role to set up (the latest or a specific version of) supervisor in Debian-like systems","archived":false,"fork":false,"pushed_at":"2023-11-02T11:07:24.000Z","size":158,"stargazers_count":34,"open_issues_count":2,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-11-02T11:37:47.184Z","etag":null,"topics":["ansible","debian","init","init-system","supervisord","ubuntu","xml-rpc","xmlrpc-server"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-03-26T19:25:40.000Z","updated_at":"2023-05-12T16:41:45.000Z","dependencies_parsed_at":"2023-01-14T14:52:19.018Z","dependency_job_id":"e67a568f-9630-4e9c-b28d-f2c4d50a7356","html_url":"https://github.com/Oefenweb/ansible-supervisor","commit_stats":null,"previous_names":[],"tags_count":67,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-supervisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-supervisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-supervisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-supervisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-supervisor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225917709,"owners_count":17544938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","debian","init","init-system","supervisord","ubuntu","xml-rpc","xmlrpc-server"],"created_at":"2024-11-22T15:20:22.895Z","updated_at":"2024-11-22T15:20:23.501Z","avatar_url":"https://github.com/Oefenweb.png","language":"Jinja","readme":"## supervisor\n\n[![CI](https://github.com/Oefenweb/ansible-app-dev-db-server/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-app-dev-db-server/actions?query=workflow%3ACI)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-supervisor-blue.svg)](https://galaxy.ansible.com/Oefenweb/supervisor)\n\nSet up the latest or a specific version of supervisor in Debian-like systems.\n\n#### Requirements\n\n* `python` (will be installed)\n* `pip` (will not installed)\n\n#### Variables\n\n* `supervisor_python_version_major` [default: `2`]: Python version to install `supervisor` for.\n* `supervisor_python_version` [default: `supervisor_python_version`]: Deprecated\n\n* `supervisor_version` [default: `latest`]: Supervisor version to install (e.g. `latest`, `3.3.1`)\n* `supervisor_unix_http_server_file` [default: `/var/run/supervisor.sock`]: A path to a UNIX domain socket (e.g. `/tmp/supervisord.sock`) on which supervisor will listen for HTTP/XML-RPC requests. `supervisorctl` uses XML-RPC to communicate with supervisord over this port\n* `supervisor_unix_http_server_chmod` [default: `'0700'`]: Change the UNIX permission mode bits of the UNIX domain socket to this value at startup\n* `supervisor_unix_http_server_chown` [optional]: The user and group of `supervisor_unix_http_server_file` file. Use the following format: `user:group`\n* `supervisor_unix_http_server_username` [optional]: The username for authentication to the HTTP/XML-RPC server\n* `supervisor_unix_http_server_password` [optional]: The password for authentication to the HTTP/XML-RPC server. This can be a cleartext password, or can be specified as a `SHA-1` hash if prefixed by the string `{SHA}`\n\n* `supervisor_system_user` [default: `root`]: Name of the user that should own the config file/directory\n* `supervisor_system_group` [default: `root`]: Name of the group that should own the config file/directory\n\n* `supervisor_inet_http_server_enabled` [default: `false`]: Whether or not to enable the HTTP server\n* `supervisor_inet_http_server_port` [default: `9001`]: A TCP host:port value or (e.g. `127.0.0.1:9001`) on which supervisor will listen for HTTP/XML-RPC requests. `supervisorctl` will use XML-RPC to communicate with supervisord over this port\n* `supervisor_inet_http_server_username` [default: `admin`]: The username required for authentication to this HTTP server **Make sure to change!**\n* `supervisor_inet_http_server_password` [default: `'4ubA\u0026Et=ASPe'`]: The password required for authentication to this HTTP server. This can be a cleartext password, or can be specified as a SHA-1 hash if prefixed by the string `{SHA}` **Make sure to change!**\n\n* `supervisor_supervisord_nodaemon` [default: `false`]: If true, supervisord will start in the foreground instead of daemonizing\n* `supervisor_supervisord_logfile` [default: `/var/log/supervisor/supervisord.log`]: The path to the activity log of the supervisord process\n* `supervisor_supervisord_pidfile` [default: `/var/run/supervisord.pid`]: The location in which supervisord keeps its pid file\n* `supervisor_supervisord_childlogdir` [default: `/var/log/supervisor`]: The directory used for `AUTO` child log files\n* `supervisor_supervisord_environment` [default: `''`]: A list of key/value pairs comma separated that will be placed in the environment (e.g. `'KEY1=\"VALUE1\",KEY2=\"VALUE2\"'`)\n\n* `supervisor_supervisorctl_serverurl` [default: `\"unix://{{ supervisor_unix_http_server_file }}\"`]: The URL that should be used to access the supervisord server, e.g. `http://localhost:9001`. For UNIX domain sockets, use `unix:///absolute/path/to/file.sock`\n\n* `supervisor_include` [default: `'/etc/supervisor/conf.d/*.conf'`]: A (single) absolute file glob of files to include\n\n* `supervisor_programs_present` [default: `{}`, see `templates/etc/supervisor/conf.d/program.conf.j2`]: Program definitions\n* `supervisor_programs_present.{n}` [required]: Program name\n* `supervisor_programs_present.{n}.command` [required]: The command that will be run when this program is started\n* `supervisor_programs_present.{n}.directory` [optional]: A directory to which supervisord should temporarily chdir before exec’ing the child\n* `supervisor_programs_present.{n}.environment` [optional]: A list of key/value pairs comma separated that will be placed in the child process’ environment (e.g. 'KEY1=\"VALUE1\",KEY2=\"VALUE2\"')\n* `supervisor_programs_present.{n}.autostart` [optional, default `true`]: If true, this program will start automatically when supervisord is started\n* `supervisor_programs_present.{n}.autorestart` [optional, default `unexpected`]: Whether the process will be autorestarted (e.g. `true`, `false`)\n* `supervisor_programs_present.{n}.startretries` [optional]: The number of serial failure attempts that supervisord will allow when attempting to start the program before giving up\n* `supervisor_programs_present.{n}.startsecs` [optional]: The total number of seconds which the program needs to stay running after a startup to consider the start successful\n* `supervisor_programs_present.{n}.stdout_logfile` [optional]: Put process stdout output in this file\n* `supervisor_programs_present.{n}.stdout_logfile_maxbytes` [optional]: The maximum number of bytes that may be consumed by `stdout_logfile` before it is rotated\n* `supervisor_programs_present.{n}.stderr_logfile` [optional]: Put process stderr output in this file\n* `supervisor_programs_present.{n}.stderr_logfile_maxbytes` [optional]: The maximum number of bytes before logfile rotation for `stderr_logfile`\n* `supervisor_programs_present.{n}.user` [optional]: This UNIX user account will be used as the account which runs the program\n* `supervisor_programs_present.{n}.numprocs` [optional]: Supervisor will start as many instances of this program as named by numprocs\n* `supervisor_programs_present.{n}.process_name` [optional]: Process name, defaults to `%(program_name)s-%(process_num)s` when `numprocs` \u003e 1\n* `supervisor_programs_present.{n}.stopsignal` [optional]: The signal used to kill the program when a stop is requested\n* `supervisor_programs_present.{n}.stopwaitsecs` [optional]: The number of seconds to wait for the OS to return a `SIGCHILD` to supervisord after the program has been sent a stopsignal\n* `supervisor_programs_present.{n}.stopasgroup` [optional, default `false`]: If `true`, the flag causes supervisor to send the stop signal to the whole process group and implies `killasgroup` is `true`\n* `supervisor_programs_present.{n}.killasgroup` [optional, default `false`]: If `true`, when resorting to send `SIGKILL` to the program to terminate it send it to its whole process group instead, taking care of its children as well\n* `supervisor_programs_absent` [default: `{}`]: Program definitions (to be removed)\n\n* `supervisor_groups_present` [default: `{}`, see `templates/etc/supervisor/conf.d/group.conf.j2`]: Group definitions\n* `supervisor_groups_present.{n}` [required]: Group name\n* `supervisor_groups_present.{n}.programs` [required]: List of programs\n* `supervisor_groups_present.{n}.priority` [optional]: A priority number\n* `supervisor_groups_absent` [default: `{}`]: Group definitions (to be removed)\n\n## Dependencies\n\nNone\n\n## Recommended\n\n* `ansible-pip` ([see](https://github.com/Oefenweb/ansible-pip))\n\n#### Example\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.supervisor\n```\n\n##### Adding two programs in one group\n\n```yaml\nsupervisor_programs_present:\n  foo:\n    command: 'sleep 10'\n    directory: /tmp\n    autostart: true\n    autorestart: true\n    startretries: 3\n    stdout_logfile: /tmp/foo.out\n    stdout_logfile_maxbytes: 0\n    stderr_logfile: /tmp/foo.err\n    stderr_logfile_maxbytes: 0\n    user: vagrant\n    numprocs: 8\n    process_name: '%(program_name)s-%(process_num)s'\n  bar:\n    command: 'sleep 10'\n    directory: /tmp\n    autostart: true\n    autorestart: true\n    startretries: 3\n    stdout_logfile: /tmp/bar.out\n    stdout_logfile_maxbytes: 0\n    stderr_logfile: /tmp/bar.err\n    stderr_logfile_maxbytes: 0\n    user: vboxadd\n\nsupervisor_groups_present:\n  foo-and-bar:\n    programs:\n      - foo\n      - bar\n    priority: 10\n```\n\n##### Removing a group\n\n```yaml\nsupervisor_groups_absent:\n  foo-and-bar: {}\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\nMischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-supervisor/issues)!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-supervisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-supervisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-supervisor/lists"}