Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

64 строки
5.3 KiB

  1. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required matrix-authentication-service 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_authentication_service_hostname', when: true}
  13. - {'name': 'matrix_authentication_service_config_database_username', when: true}
  14. - {'name': 'matrix_authentication_service_config_database_password', when: true}
  15. - {'name': 'matrix_authentication_service_config_database_host', when: "{{ not matrix_authentication_service_config_database_socket_enabled }}"}
  16. - {'name': 'matrix_authentication_service_config_database_socket_path_host', when: "{{ matrix_authentication_service_config_database_socket_enabled }}"}
  17. - {'name': 'matrix_authentication_service_config_database_database', when: true}
  18. - {'name': 'matrix_authentication_service_config_secrets_encryption', when: true}
  19. - {'name': 'matrix_authentication_service_config_matrix_homeserver', when: true}
  20. - {'name': 'matrix_authentication_service_config_matrix_secret', when: true}
  21. - {'name': 'matrix_authentication_service_config_matrix_endpoint', when: true}
  22. - {'name': 'matrix_authentication_service_container_labels_public_main_hostname', when: "{{ matrix_authentication_service_container_labels_traefik_enabled }}"}
  23. - {'name': 'matrix_authentication_service_container_labels_public_compatibility_layer_hostname', when: "{{ matrix_authentication_service_container_labels_public_compatibility_layer_enabled }}"}
  24. - {'name': 'matrix_authentication_service_container_labels_internal_compatibility_layer_entrypoints', when: "{{ matrix_authentication_service_container_labels_internal_compatibility_layer_enabled }}"}
  25. - {'name': 'matrix_authentication_service_config_email_hostname', when: "{{ matrix_authentication_service_config_email_transport == 'smtp' }}"}
  26. - {'name': 'matrix_authentication_service_config_captcha_site_key', when: "{{ matrix_authentication_service_config_captcha_service != '' }}"}
  27. - {'name': 'matrix_authentication_service_config_captcha_secret_key', when: "{{ matrix_authentication_service_config_captcha_service != '' }}"}
  28. - name: Fail if matrix_authentication_service_config_secrets_encryption is not 64 characters long
  29. ansible.builtin.fail:
  30. msg: "matrix_authentication_service_config_secrets_encryption must be exactly 64 characters long (preferably generated via `openssl rand -hex 32`)"
  31. when: "matrix_authentication_service_config_secrets_encryption | length != 64"
  32. - name: Fail if matrix_authentication_service_config_email_transport is invalid
  33. ansible.builtin.fail:
  34. msg: "matrix_authentication_service_config_email_transport must be one of: blackhole, smtp, or aws_ses"
  35. when: "matrix_authentication_service_config_email_transport not in ['blackhole', 'smtp', 'aws_ses']"
  36. - name: Fail if matrix_authentication_service_config_captcha_service is invalid
  37. ansible.builtin.fail:
  38. msg: "matrix_authentication_service_config_captcha_service must be one of: recaptcha_v2, cloudflare_turnstile, or hcaptcha (or empty, to disable CAPTCHA protection)"
  39. when: "matrix_authentication_service_config_captcha_service not in ['', 'recaptcha_v2', 'cloudflare_turnstile', 'hcaptcha']"
  40. - name: (Deprecation) Catch and report renamed matrix-authentication-service settings
  41. ansible.builtin.fail:
  42. msg: >-
  43. Your configuration contains a variable, which now has a different name.
  44. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  45. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  46. with_items:
  47. - {'old': 'matrix_authentication_service_container_image_name_prefix', 'new': 'matrix_authentication_service_container_image_registry_prefix'}
  48. - {'old': 'matrix_authentication_service_syn2mas_container_image_name_prefix', 'new': 'matrix_authentication_service_syn2mas_container_image_registry_prefix'}
  49. - {'old': 'matrix_authentication_service_syn2mas_container_image', 'new': '<removed>'}
  50. - {'old': 'matrix_authentication_service_syn2mas_container_image_registry_prefix', 'new': '<removed>'}
  51. - {'old': 'matrix_authentication_service_syn2mas_container_image_registry_prefix_upstream', 'new': '<removed>'}
  52. - {'old': 'matrix_authentication_service_syn2mas_container_image_registry_prefix_upstream_default', 'new': '<removed>'}
  53. - {'old': 'matrix_authentication_service_syn2mas_container_image_force_pull', 'new': '<removed>'}
  54. - {'old': 'matrix_authentication_service_syn2mas_container_image_self_build', 'new': '<removed>'}
  55. - {'old': 'matrix_authentication_service_syn2mas_process_extra_arguments', 'new': 'matrix_authentication_service_syn2mas_command_extra_options or matrix_authentication_service_syn2mas_subcommand_extra_options'}
  56. - {'old': 'matrix_authentication_service_syn2mas_dry_run', 'new': 'matrix_authentication_service_syn2mas_migrate_dry_run'}
  57. - {'old': 'matrix_authentication_service_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}