Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

41 lines
2.4 KiB

  1. # SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 MDAD project contributors
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: (Deprecation) Catch and report renamed matrix-synapse-admin settings
  7. ansible.builtin.fail:
  8. msg: >-
  9. Your configuration contains a variable, which now has a different name.
  10. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  11. when: "item.old in vars"
  12. with_items:
  13. - {'old': 'matrix_synapse_admin_docker_repo', 'new': 'matrix_synapse_admin_container_self_build_repo'}
  14. - {'old': 'matrix_synapse_admin_container_self_build', 'new': 'matrix_synapse_admin_container_image_self_build'}
  15. - {'old': 'matrix_synapse_admin_container_self_build_repo', 'new': 'matrix_synapse_admin_container_image_self_build_repo'}
  16. - {'old': 'matrix_synapse_admin_public_endpoint', 'new': 'matrix_synapse_admin_path_prefix'}
  17. - {'old': 'matrix_synapse_admin_nginx_proxy_integration_enabled', 'new': '<removed>'}
  18. - {'old': 'matrix_synapse_admin_docker_image_name_prefix', 'new': 'matrix_synapse_admin_docker_image_registry_prefix'}
  19. - when: matrix_synapse_admin_container_labels_traefik_enabled | bool
  20. block:
  21. - name: Fail if required matrix-synapse-admin Traefik settings not defined
  22. ansible.builtin.fail:
  23. msg: >-
  24. You need to define a required configuration setting (`{{ item }}`).
  25. when: "vars[item] == ''"
  26. with_items:
  27. - matrix_synapse_admin_container_labels_traefik_hostname
  28. - matrix_synapse_admin_container_labels_traefik_path_prefix
  29. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  30. # Knowing that `matrix_synapse_admin_container_labels_traefik_path_prefix` does not end with a slash
  31. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  32. - name: Fail if matrix_synapse_admin_container_labels_traefik_path_prefix ends with a slash
  33. ansible.builtin.fail:
  34. msg: >-
  35. matrix_synapse_admin_container_labels_traefik_path_prefix (`{{ matrix_synapse_admin_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/synapse-admin`).
  36. when: "matrix_synapse_admin_container_labels_traefik_path_prefix != '/' and matrix_synapse_admin_container_labels_traefik_path_prefix[-1] == '/'"