Browse Source

uwsgi handler

master
parent
commit
cb1b2fcdcc
2 changed files with 9 additions and 0 deletions
  1. +5
    -0
      handlers/main.yaml
  2. +4
    -0
      tasks/main.yaml

+ 5
- 0
handlers/main.yaml View File

@@ -1 +1,6 @@
--- ---

- name: restart uwsgi
service:
name: uwsgi
state: restarted

+ 4
- 0
tasks/main.yaml View File

@@ -13,6 +13,7 @@
pip: pip:
name: alerta-server name: alerta-server
executable: pip3 executable: pip3
notify: restart uwsgi


- name: alerta client pip package - name: alerta client pip package
pip: pip:
@@ -66,14 +67,17 @@
content: content:
uwsgi: "{{alerta_uwsgi_config}}" uwsgi: "{{alerta_uwsgi_config}}"
dest: /etc/uwsgi/apps-available/alerta.json dest: /etc/uwsgi/apps-available/alerta.json
notify: restart uwsgi


- name: enable alerta uwsgi configuration - name: enable alerta uwsgi configuration
file: file:
src: ../apps-available/alerta.json src: ../apps-available/alerta.json
dest: /etc/uwsgi/apps-enabled/alerta.json dest: /etc/uwsgi/apps-enabled/alerta.json
state: link state: link
notify: restart uwsgi


- name: alerta wsgi python file - name: alerta wsgi python file
copy: copy:
content: from alerta import app content: from alerta import app
dest: /opt/alerta/wsgi.py dest: /opt/alerta/wsgi.py
notify: restart uwsgi

Loading…
Cancel
Save