Bootstrap alerta

This commit is contained in:
Luke Murphy
2020-04-08 19:45:03 +02:00
commit 05bf3665a7
20 changed files with 222 additions and 0 deletions

40
ansible/post-deploy.yml Normal file
View File

@ -0,0 +1,40 @@
---
- hosts: all
gather_facts: false
tasks:
- name: Load variables
include_vars:
dir: "{{ dokku_lib_root }}/data/ansible/alerta/vars/"
extensions:
- yml
- name: Set HTTP 80 port proxy
dokku_ports:
app: alerta
mappings:
- "http:80:{{ http_port }}"
state: present
- name: Setup LE certificates
shell: dokku letsencrypt alerta
args:
creates: /home/dokku/alerta/letsencrypt/certs
- name: Setup LE certificates renew cron job
shell: dokku letsencrypt:cron-job --add
args:
creates: /home/dokku/alerta/letsencrypt/cron-job
- name: Remove automatically configured ports
dokku_ports:
app: alerta
mappings:
- "http:8080:8080"
state: absent
- name: Set HTTP 443 port
dokku_ports:
app: alerta
mappings:
- "https:443:{{ http_port }}"
state: present