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.
 
 

35 lines
2.1 KiB

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