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

88 строки
5.1 KiB

  1. # SPDX-FileCopyrightText: 2020 Marcel Partap
  2. # SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2021 boris runakov
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. ---
  7. - name: (Deprecation) Warn about ma1sd variables that are not used anymore
  8. ansible.builtin.fail:
  9. msg: >
  10. The `{{ item }}` variable defined in your configuration is not used by this playbook anymore!
  11. You'll need to adapt to the new way of extending ma1sd configuration.
  12. See the CHANGELOG and the `matrix_ma1sd_configuration_extension_yaml` variable for more information and examples.
  13. when: "item in vars"
  14. with_items:
  15. - 'matrix_ma1sd_ldap_enabled'
  16. - 'matrix_ma1sd_ldap_connection_host'
  17. - 'matrix_ma1sd_ldap_connection_tls'
  18. - 'matrix_ma1sd_ldap_connection_port'
  19. - 'matrix_ma1sd_ldap_connection_baseDn'
  20. - 'matrix_ma1sd_ldap_connection_baseDns'
  21. - 'matrix_ma1sd_ldap_connection_bindDn'
  22. - 'matrix_ma1sd_ldap_connection_bindPassword'
  23. - 'matrix_ma1sd_ldap_filter'
  24. - 'matrix_ma1sd_ldap_attribute_uid_type'
  25. - 'matrix_ma1sd_ldap_attribute_uid_value'
  26. - 'matrix_ma1sd_ldap_connection_bindPassword'
  27. - 'matrix_ma1sd_ldap_attribute_name'
  28. - 'matrix_ma1sd_ldap_attribute_threepid_email'
  29. - 'matrix_ma1sd_ldap_attribute_threepid_msisdn'
  30. - 'matrix_ma1sd_ldap_identity_filter'
  31. - 'matrix_ma1sd_ldap_identity_medium'
  32. - 'matrix_ma1sd_ldap_auth_filter'
  33. - 'matrix_ma1sd_ldap_directory_filter'
  34. - 'matrix_ma1sd_template_config'
  35. - 'matrix_ma1sd_architecture'
  36. - name: Ensure ma1sd configuration does not contain any dot-notation keys
  37. ansible.builtin.fail:
  38. msg: >
  39. Since version 1.3.0, ma1sd will not accept property-style configuration keys.
  40. You have defined a key (`{{ item.key }}`) which contains a dot.
  41. Instead, use nesting. See: https://github.com/ma1uta/ma1sd/wiki/Upgrade-Notes#v130
  42. when: "'.' in item.key"
  43. with_dict: "{{ matrix_ma1sd_configuration }}"
  44. - name: Fail if required ma1sd settings not defined
  45. ansible.builtin.fail:
  46. msg: >
  47. You need to define a required configuration setting (`{{ item.name }}`).
  48. when: "item.when | bool and vars[item.name] == ''"
  49. with_items:
  50. - {'name': 'matrix_ma1sd_hostname', when: true}
  51. - {'name': 'matrix_ma1sd_threepid_medium_email_connectors_smtp_host', when: true}
  52. - {'name': 'matrix_ma1sd_dns_overwrite_homeserver_client_value', when: true}
  53. - {'name': 'matrix_ma1sd_database_hostname', when: "{{ matrix_ma1sd_database_engine == 'postgres' }}"}
  54. - {'name': 'matrix_ma1sd_container_network', when: true}
  55. - {'name': 'matrix_ma1sd_container_labels_matrix_identity_hostname', when: "{{ matrix_ma1sd_container_labels_matrix_identity_enabled }}"}
  56. - {'name': 'matrix_ma1sd_container_labels_matrix_identity_path_prefix', when: "{{ matrix_ma1sd_container_labels_matrix_identity_enabled }}"}
  57. - {'name': 'matrix_ma1sd_container_labels_matrix_client_user_directory_search_hostname', when: "{{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_enabled }}"}
  58. - {'name': 'matrix_ma1sd_container_labels_matrix_client_user_directory_search_path_regexp', when: "{{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_enabled }}"}
  59. - {'name': 'matrix_ma1sd_container_labels_matrix_client_3pid_registration_path_regexp', when: "{{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_enabled }}"}
  60. - name: (Deprecation) Catch and report renamed ma1sd variables
  61. ansible.builtin.fail:
  62. msg: >-
  63. Your configuration contains a variable, which now has a different name.
  64. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  65. when: "item.old in vars"
  66. with_items:
  67. - {'old': 'matrix_ma1sd_container_expose_port', 'new': '<superseded by matrix_ma1sd_container_http_host_bind_port>'}
  68. - {'old': 'matrix_ma1sd_threepid_medium_email_custom_unbind_fraudulent_template', 'new': 'matrix_ma1sd_threepid_medium_email_custom_session_unbind_notification_template'}
  69. - {'old': 'matrix_ma1sd_default_port', 'new': 'matrix_ma1sd_container_port'}
  70. - {'old': 'matrix_ma1sd_container_labels_matrix_client_user_directory_search_path', 'new': 'matrix_ma1sd_container_labels_matrix_client_user_directory_search_path_regexp'}
  71. - {'old': 'matrix_ma1sd_container_labels_matrix_client_3pid_registration_path', 'new': 'matrix_ma1sd_container_labels_matrix_client_3pid_registration_path_regexp'}
  72. - {'old': 'matrix_ma1sd_docker_image_name_prefix', 'new': 'matrix_ma1sd_docker_image_registry_prefix'}
  73. - name: (Deprecation) Catch and report mxisd variables
  74. ansible.builtin.fail:
  75. msg: >-
  76. mxisd is deprecated and has been replaced with ma1sd (https://github.com/ma1uta/ma1sd), a compatible fork.
  77. The playbook will migrate your existing mxisd configuration and data automatically, but you need to adjust variable names.
  78. Please change your configuration (vars.yml) to rename all mxisd variables (`{{ item.old }}` -> `{{ item.new }}`).
  79. when: "vars | dict2items | selectattr('key', 'match', item.old) | list | items2dict"
  80. with_items:
  81. - {'old': 'matrix_mxisd_.*', 'new': 'matrix_ma1sd_.*'}