# SPDX-FileCopyrightText: 2023 Johan Swetzén
# SPDX-FileCopyrightText: 2024 Slavi Pantaleev
#
# SPDX-License-Identifier: AGPL-3.0-or-later

---

- tags:
    - setup-all
    - setup-mautrix-wsproxy
    - install-all
    - install-mautrix-wsproxy
  block:
    - when: matrix_mautrix_wsproxy_enabled | bool
      ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"

    - when: matrix_mautrix_wsproxy_enabled | bool
      ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"

- tags:
    - setup-all
    - setup-mautrix-wsproxy
  block:
    - when: not matrix_mautrix_wsproxy_enabled | bool
      ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"