Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

72 lines
3.6 KiB

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