Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

54 Zeilen
3.0 KiB

  1. ---
  2. - name: Fail if required Dimension settings not defined
  3. ansible.builtin.fail:
  4. msg: >
  5. You need to define a required configuration setting (`{{ item.name }}`).
  6. when: "item.when | bool and vars[item.name] == ''"
  7. with_items:
  8. - {'name': 'matrix_dimension_hostname', when: true}
  9. - {'name': 'matrix_dimension_container_network', when: true}
  10. - {'name': 'matrix_dimension_access_token', when: true}
  11. - {'name': 'matrix_dimension_homeserver_clientServerUrl', when: true}
  12. - {'name': 'matrix_dimension_homeserver_federationUrl', when: true}
  13. - {'name': 'matrix_dimension_homeserver_mediaUrl', when: true}
  14. - {'name': 'matrix_dimension_database_hostname', when: "{{ matrix_dimension_database_engine == 'postgres' }}"}
  15. - name: (Deprecation) Catch and report renamed Dimension variables
  16. ansible.builtin.fail:
  17. msg: >-
  18. Your configuration contains a variable, which now has a different name.
  19. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  20. when: "item.old in vars"
  21. with_items:
  22. - {'old': 'matrix_dimension_container_expose_port', 'new': '<superseded by matrix_dimension_container_http_host_bind_port>'}
  23. - {'old': 'matrix_dimension_container_image_name_prefix', 'new': 'matrix_dimension_docker_image_registry_prefix'}
  24. - when: matrix_dimension_container_labels_traefik_enabled | bool
  25. block:
  26. - name: Fail if required Dimension Traefik settings not defined
  27. ansible.builtin.fail:
  28. msg: >-
  29. You need to define a required configuration setting (`{{ item }}`).
  30. when: "vars[item] == ''"
  31. with_items:
  32. - matrix_dimension_container_labels_traefik_hostname
  33. - matrix_dimension_container_labels_traefik_path_prefix
  34. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  35. # Knowing that `matrix_dimension_container_labels_traefik_path_prefix` does not end with a slash
  36. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  37. - name: Fail if matrix_dimension_container_labels_traefik_path_prefix ends with a slash
  38. ansible.builtin.fail:
  39. msg: >-
  40. matrix_dimension_container_labels_traefik_path_prefix (`{{ matrix_dimension_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/dimension`).
  41. when: "matrix_dimension_container_labels_traefik_path_prefix != '/' and matrix_dimension_container_labels_traefik_path_prefix[-1] == '/'"
  42. - name: Fail if matrix_dimension_container_labels_traefik_path_prefix is not /
  43. ansible.builtin.fail:
  44. msg: >-
  45. matrix_dimension_container_labels_traefik_path_prefix (`{{ matrix_dimension_container_labels_traefik_path_prefix }}`) must currently be set to `/`.
  46. Other values are not supported.
  47. See: https://github.com/turt2live/matrix-dimension/issues/510
  48. when: "matrix_dimension_container_labels_traefik_path_prefix != '/' and matrix_dimension_container_labels_traefik_path_prefix[-1] == '/'"