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.
 
 

39 rivejä
2.2 KiB

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