Matrix Docker Ansible eploy
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

87 rindas
5.3 KiB

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