ansible-nginx-uwsgi-supervisor/tasks/supervisor.yaml

26 lines
796 B
YAML
Raw Normal View History

---
- name: install supervisord
apt: name=supervisor state=present
sudo: yes
- name: set permissions on supervisor config and log directories
file: path={{ item }} group={{ web_server_group }} state=directory mode=0755
with_items:
- /etc/supervisor
- /etc/supervisor/conf.d
- /var/log/supervisor
sudo: yes
- name: modify supervisor configuration
ini_file: dest=/etc/supervisor/supervisord.conf section=unix_http_server
option={{ item.key }} value={{ item.value }}
with_dict:
chmod: "0770"
chown: root:{{ web_server_group }}
sudo: yes
- name: upload supervisor configuration to web server home
template: src=supervisor/app_supervisor.conf dest=/etc/supervisor/conf.d/{{ supervisor_app_config }}
sudo: yes
notify: restart supervisord