Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

54 linhas
2.8 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: (Deprecation) Catch and report renamed tuwunel variables
  7. ansible.builtin.fail:
  8. msg: >-
  9. Your configuration contains a variable, which now has a different name.
  10. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  11. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  12. with_items:
  13. - {'old': 'matrix_tuwunel_config_ldap_name_attribute', 'new': '<removed> (tuwunel v1.9.0 dropped the option; the localpart must appear in the attribute named by `matrix_tuwunel_config_ldap_uid_attribute`)'}
  14. - name: Fail if required tuwunel settings not defined
  15. ansible.builtin.fail:
  16. msg: >-
  17. You need to define a required configuration setting (`{{ item.name }}`).
  18. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  19. with_items:
  20. - {'name': 'matrix_tuwunel_hostname', when: true}
  21. - {'name': 'matrix_tuwunel_container_network', when: true}
  22. - {'name': 'matrix_tuwunel_container_labels_internal_client_api_traefik_entrypoints', when: "{{ matrix_tuwunel_container_labels_internal_client_api_enabled }}"}
  23. - name: Fail if registration is enabled without a token or explicit acknowledgement
  24. ansible.builtin.fail:
  25. msg: >-
  26. `matrix_tuwunel_config_allow_registration` is true, but neither
  27. `matrix_tuwunel_config_registration_token` nor
  28. `matrix_tuwunel_config_yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse`
  29. is set. Set a registration token (recommended) or explicitly opt in to open registration.
  30. when: >-
  31. matrix_tuwunel_config_allow_registration | bool
  32. and (matrix_tuwunel_config_registration_token | length == 0)
  33. and not (matrix_tuwunel_config_yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse | bool)
  34. - name: Fail if a storage provider is missing required fields
  35. ansible.builtin.fail:
  36. msg: >-
  37. Storage provider `{{ item.id | default('?') }}` is missing required fields.
  38. Each entry must define both `id` and `kind` (one of: local, s3).
  39. when: "(item.id | default('') | length == 0) or (item.kind | default('') not in ['local', 's3'])"
  40. with_items: "{{ matrix_tuwunel_config_storage_providers }}"
  41. - name: Fail if an identity provider is missing required fields
  42. ansible.builtin.fail:
  43. msg: >-
  44. Identity provider entry is missing both `client_id` and `brand`.
  45. At minimum one of these is required for tuwunel to identify the provider.
  46. when: "(item.client_id | default('') | length == 0) and (item.brand | default('') | length == 0)"
  47. with_items: "{{ matrix_tuwunel_config_identity_providers }}"