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.
 
 

30 lines
1.5 KiB

  1. ---
  2. - name: Fail if required Cinny settings not defined
  3. ansible.builtin.fail:
  4. msg: >
  5. You need to define a required configuration setting (`{{ item }}`) to use Cinny.
  6. when: "vars[item] == '' or vars[item] is none"
  7. with_items:
  8. - matrix_client_cinny_default_hs_url
  9. - matrix_client_cinny_container_network
  10. - when: matrix_client_cinny_container_labels_traefik_enabled | bool
  11. block:
  12. - name: Fail if required matrix-client-cinny Traefik settings not defined
  13. ansible.builtin.fail:
  14. msg: >-
  15. You need to define a required configuration setting (`{{ item }}`).
  16. when: "vars[item] == ''"
  17. with_items:
  18. - matrix_client_cinny_container_labels_traefik_hostname
  19. - matrix_client_cinny_container_labels_traefik_path_prefix
  20. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  21. # Knowing that `matrix_client_cinny_container_labels_traefik_path_prefix` does not end with a slash
  22. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  23. - name: Fail if matrix_client_cinny_container_labels_traefik_path_prefix ends with a slash
  24. ansible.builtin.fail:
  25. msg: >-
  26. matrix_client_cinny_container_labels_traefik_path_prefix (`{{ matrix_client_cinny_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/cinny`).
  27. when: "matrix_client_cinny_container_labels_traefik_path_prefix != '/' and matrix_client_cinny_container_labels_traefik_path_prefix[-1] == '/'"