# run_once_cmp_docker_oauth2: disabled

- name: "For '{{ application_id }}': Load docker-compose"
  include_role: 
    name: docker-compose
  vars:
    docker_compose_flush_handlers: false

- block:
    - name: "set oauth2_proxy_application_id (Needed due to lazzy loading issue)"
      set_fact:
        oauth2_proxy_application_id: "{{ application_id }}"
    - name: "include the web-app-oauth2-proxy role {{ domain }}"
      include_tasks: "{{ playbook_dir }}/roles/web-app-oauth2-proxy/tasks/main.yml"
  when: applications | get_app_conf(application_id, 'features.oauth2', False)

- name: "flush docker compose and oauth2 proxy for '{{ application_id }}'"
  meta: flush_handlers
  when: docker_compose_flush_handlers | bool