---
- name: "include create-domains.yml for peertube"
  include_tasks: create-domains.yml
  loop: "{{ domains['web-app-peertube'] }}"
  loop_control:
    loop_var: domain
  vars:
    # Websockt and http listen to the same port
    http_port:  "{{ ports.localhost.http[application_id] }}"
    ws_port:    "{{ ports.localhost.http[application_id] }}"

- name: "load docker and db for {{ application_id }}"
  include_role: 
    name: cmp-db-docker

- name: "Install and activate auth-openid-connect plugin if OIDC is enabled"
  include_tasks: enable-oidc.yml
  when: applications | get_app_conf(application_id, 'features.oidc', False)

- name: "Deinstall and disable auth-openid-connect plugin if OIDC is enabled"
  include_tasks: disable-oidc.yml
  when: applications | get_app_conf(application_id, 'features.oidc', False)