2020-12-07 12:20:33 +01:00
|
|
|
---
|
2023-09-26 08:58:24 +02:00
|
|
|
- name: Create app compose file
|
2020-12-07 13:11:09 +01:00
|
|
|
template:
|
|
|
|
src: 'docker-compose.yml.j2'
|
|
|
|
dest: '{{ alertmanager_compose_file }}'
|
|
|
|
owner: 'dockremap'
|
|
|
|
group: 'docker'
|
2020-12-07 14:39:30 +01:00
|
|
|
mode: 0640
|
2020-12-07 13:11:09 +01:00
|
|
|
|
2023-09-26 08:58:24 +02:00
|
|
|
- name: Create OAuth compose file
|
2024-05-14 10:25:02 +02:00
|
|
|
include_role: name=infra-role-oauth-proxy
|
2023-09-26 08:58:24 +02:00
|
|
|
vars:
|
2024-08-20 17:43:32 +02:00
|
|
|
oauth_service_name: '{{ alertmanager_service_name }}-oauth'
|
|
|
|
oauth_service_path: '{{ alertmanager_service_path }}'
|
|
|
|
oauth_compose_path: '{{ alertmanager_oauth_compose_file }}'
|
|
|
|
oauth_provider: '{{ alertmanager_oauth_provider | mandatory }}'
|
|
|
|
oauth_domain: '{{ alertmanager_domain | mandatory }}'
|
|
|
|
oauth_github_org: '{{ alertmanager_oauth_gh_org }}'
|
|
|
|
oauth_github_teams: '{{ alertmanager_oauth_gh_teams }}'
|
|
|
|
oauth_keycloak_realm: '{{ alertmanager_oauth_keycloak_realm }}'
|
|
|
|
oauth_keycloak_groups: '{{ alertmanager_oauth_keycloak_groups }}'
|
|
|
|
oauth_keycloak_roles: '{{ alertmanager_oauth_keycloak_roles }}'
|
|
|
|
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'
|
2025-01-09 16:10:45 +01:00
|
|
|
oauth_upstream_url: 'http://{{ alertmanager_service_name }}:{{ alertmanager_webui_port }}/'
|
2023-09-26 08:58:24 +02:00
|
|
|
|
2020-12-07 13:11:09 +01:00
|
|
|
- name: Create containers
|
2024-10-15 21:37:22 +02:00
|
|
|
community.docker.docker_compose_v2:
|
2020-12-07 13:11:09 +01:00
|
|
|
project_src: '{{ alertmanager_service_path }}'
|
2023-09-26 08:58:24 +02:00
|
|
|
files: ['{{ alertmanager_compose_file }}', '{{ alertmanager_oauth_compose_file }}']
|
2024-10-15 21:37:22 +02:00
|
|
|
recreate: '{{ compose_recreate }}'
|
|
|
|
pull: '{{ compose_pull }}'
|
|
|
|
state: '{{ "restarted" if alertmanager_config.changed else compose_state }}'
|