Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

45 righe
2.2 KiB

  1. # SPDX-FileCopyrightText: 2025 - 2026 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2025 - 2026 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required tuwunel settings not defined
  7. ansible.builtin.fail:
  8. msg: >-
  9. You need to define a required configuration setting (`{{ item.name }}`).
  10. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  11. with_items:
  12. - {'name': 'matrix_tuwunel_hostname', when: true}
  13. - {'name': 'matrix_tuwunel_container_network', when: true}
  14. - {'name': 'matrix_tuwunel_container_labels_internal_client_api_traefik_entrypoints', when: "{{ matrix_tuwunel_container_labels_internal_client_api_enabled }}"}
  15. - name: Fail if registration is enabled without a token or explicit acknowledgement
  16. ansible.builtin.fail:
  17. msg: >-
  18. `matrix_tuwunel_config_allow_registration` is true, but neither
  19. `matrix_tuwunel_config_registration_token` nor
  20. `matrix_tuwunel_config_yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse`
  21. is set. Set a registration token (recommended) or explicitly opt in to open registration.
  22. when: >-
  23. matrix_tuwunel_config_allow_registration | bool
  24. and (matrix_tuwunel_config_registration_token | length == 0)
  25. and not (matrix_tuwunel_config_yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse | bool)
  26. - name: Fail if a storage provider is missing required fields
  27. ansible.builtin.fail:
  28. msg: >-
  29. Storage provider `{{ item.id | default('?') }}` is missing required fields.
  30. Each entry must define both `id` and `kind` (one of: local, s3).
  31. when: "(item.id | default('') | length == 0) or (item.kind | default('') not in ['local', 's3'])"
  32. with_items: "{{ matrix_tuwunel_config_storage_providers }}"
  33. - name: Fail if an identity provider is missing required fields
  34. ansible.builtin.fail:
  35. msg: >-
  36. Identity provider entry is missing both `client_id` and `brand`.
  37. At minimum one of these is required for tuwunel to identify the provider.
  38. when: "(item.client_id | default('') | length == 0) and (item.brand | default('') | length == 0)"
  39. with_items: "{{ matrix_tuwunel_config_identity_providers }}"