mirror of
https://github.com/status-im/infra-role-alertmanager.git
synced 2025-02-22 17:18:17 +00:00
This way we get version upgrades for free. Signed-off-by: Jakub Sokołowski <jakub@status.im>
35 lines
1.4 KiB
YAML
35 lines
1.4 KiB
YAML
---
|
|
- name: Create app compose file
|
|
template:
|
|
src: 'docker-compose.yml.j2'
|
|
dest: '{{ alertmanager_compose_file }}'
|
|
owner: 'dockremap'
|
|
group: 'docker'
|
|
mode: 0640
|
|
|
|
- name: Create OAuth compose file
|
|
include_role: name=oauth-proxy
|
|
vars:
|
|
oauth_service_name: '{{ alertmanager_service_name }}-oauth'
|
|
oauth_service_path: '{{ alertmanager_service_path }}'
|
|
oauth_compose_path: '{{ alertmanager_oauth_compose_file }}'
|
|
oauth_domain: '{{ alertmanager_domain | mandatory }}'
|
|
oauth_github_org: '{{ alertmanager_oauth_gh_org | mandatory }}'
|
|
oauth_github_teams: '{{ alertmanager_oauth_gh_teams | mandatory }}'
|
|
oauth_id: '{{ alertmanager_oauth_id | mandatory }}'
|
|
oauth_secret: '{{ alertmanager_oauth_secret | mandatory }}'
|
|
oauth_cookie_secret: '{{ alertmanager_oauth_cookie_secret | mandatory }}'
|
|
oauth_local_port: '{{ alertmanager_oauth_cont_port | mandatory }}'
|
|
oauth_local_addr: '0.0.0.0'
|
|
oauth_upstream_url: 'http://app:{{ alertmanager_webui_port }}/'
|
|
|
|
- name: Create containers
|
|
docker_compose:
|
|
project_src: '{{ alertmanager_service_path }}'
|
|
files: ['{{ alertmanager_compose_file }}', '{{ alertmanager_oauth_compose_file }}']
|
|
pull: true
|
|
build: false
|
|
state: '{{ compose_state }}'
|
|
restarted: '{{ compose_restart }}'
|
|
recreate: '{{ alertmanager_config.changed | ternary("always", compose_recreate) }}'
|