Jakub Sokołowski 4e43dd54e2
switch to using oauth-proxy Ansible role
This way we get version upgrades for free.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-09-26 09:20:38 +02:00

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) }}'