summaryrefslogtreecommitdiff
path: root/roles/monitoring/alerta/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/alerta/tasks/main.yml')
-rw-r--r--roles/monitoring/alerta/tasks/main.yml15
1 files changed, 11 insertions, 4 deletions
diff --git a/roles/monitoring/alerta/tasks/main.yml b/roles/monitoring/alerta/tasks/main.yml
index 490f5e3d..ffedb143 100644
--- a/roles/monitoring/alerta/tasks/main.yml
+++ b/roles/monitoring/alerta/tasks/main.yml
@@ -1,4 +1,11 @@
---
+- name: prepare storage volume for alerta
+ when: alerta_storage is defined
+ vars:
+ storage_volume: "{{ alerta_storage | combine({'dest': alerta_base_path}) }}"
+ include_role:
+ name: "storage/{{ alerta_storage.type }}/volume"
+
- name: create alerta subdirectories
loop:
- config
@@ -11,18 +18,18 @@
- name: generate Dockerfile for custom image
copy:
content: |
- FROM alerta/alerta-web:8.7.0
+ FROM alerta/alerta-web:{{ alerta_web_version }}
RUN set -x \
&& sed 's/USE_AM_EXTERNALURL_FOR_SILENCES/ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES/' -i /venv/lib/python3.8/site-packages/alerta_prometheus.py \
- && /venv/bin/pip install redis==4.1.4 \
- && /venv/bin/pip install git+https://github.com/alerta/alerta-contrib.git@69d271ef9fe6542727ec4aa39fc8e0f797f1e8b1#subdirectory=integrations/mailer
+ && /venv/bin/pip install redis=={{ _alerta_pip[alerta_web_version].redis_version }} \
+ && /venv/bin/pip install git+https://github.com/alerta/alerta-contrib.git@{{ _alerta_pip[alerta_web_version].contrib_mailer_git_hash }}#subdirectory=integrations/mailer
dest: "{{ alerta_base_path }}/build/Dockerfile"
register: alerta_custom_image_docker
- name: build custom image
docker_image:
- name: "alerta-web-with-mailer:8.7.0"
+ name: "alerta-web-with-mailer:{{ alerta_web_version }}"
state: present
force_source: "{{ alerta_custom_image_docker is changed }}"
source: build