Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ The path where Supervisor configuration should be stored.

`supervisor_programs` is an empty list by default; you can define a list of `program`s to be managed by Supervisor. If you set `state` to `present`, then a configuration file for the program (named `[program-name-here].conf`) will be added to the `conf.d` path included by the global Supervisor configuration. You can also manage program-level configuration on your own, outside this role, if you need more flexibility.

`supervisor_config_files` is a list of hashes (with `src` and `dest` keys) conf files to copy from the control machine. For example, to copy manually created conf files to the `conf.d` path, for example `dest: "{{ supervisor_config_path }}/conf.d/fcgi.conf"`.

supervisor_nodaemon: false

Set to `true` if you need to run Supervisor in the foreground.
Expand Down
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ supervisor_programs: []
# killasgroup=true
# stopasgroup=true

# A list of local files to copy. Example commented out below.
supervisor_config_files: []
# - src: files/supervisor/fcgi.conf
# dest: "{{ supervisor_config_path }}/conf.d/fcgi.conf"

supervisor_nodaemon: false

supervisor_log_dir: /var/log/supervisor
Expand Down
9 changes: 9 additions & 0 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,12 @@
when: item.state|default('present') == 'absent'
with_items: "{{ supervisor_programs }}"
notify: restart supervisor

- name: Include static config files
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
with_items: "{{ supervisor_config_files }}"
notify: restart supervisor