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.
 
 

38 lines
1.9 KiB

  1. ---
  2. - name: Fail if required FluffyChat Web settings not defined
  3. ansible.builtin.fail:
  4. msg: >
  5. You need to define a required configuration setting (`{{ item }}`) for using FluffyChat Web.
  6. when: "vars[item] == ''"
  7. with_items:
  8. - matrix_client_fluffychat_container_network
  9. - name: (Deprecation) Catch and report renamed FluffyChat Web variables
  10. ansible.builtin.fail:
  11. msg: >-
  12. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  13. when: "item.old in vars"
  14. with_items:
  15. - {'old': 'matrix_client_fluffychat_container_image_name_prefix', 'new': 'matrix_client_fluffychat_container_image_registry_prefix'}
  16. - when: matrix_client_fluffychat_container_labels_traefik_enabled | bool
  17. block:
  18. - name: Fail if required matrix-client-fluffychat Traefik settings not defined
  19. ansible.builtin.fail:
  20. msg: >-
  21. You need to define a required configuration setting (`{{ item }}`).
  22. when: "vars[item] == ''"
  23. with_items:
  24. - matrix_client_fluffychat_container_labels_traefik_hostname
  25. - matrix_client_fluffychat_container_labels_traefik_path_prefix
  26. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  27. # Knowing that `matrix_client_fluffychat_container_labels_traefik_path_prefix` does not end with a slash
  28. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  29. - name: Fail if matrix_client_fluffychat_container_labels_traefik_path_prefix ends with a slash
  30. ansible.builtin.fail:
  31. msg: >-
  32. matrix_client_fluffychat_container_labels_traefik_path_prefix (`{{ matrix_client_fluffychat_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/fluffychat`).
  33. when: "matrix_client_fluffychat_container_labels_traefik_path_prefix != '/' and matrix_client_fluffychat_container_labels_traefik_path_prefix[-1] == '/'"