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

77 строки
5.0 KiB

  1. ---
  2. - name: (Deprecation) Catch and report renamed settings
  3. ansible.builtin.fail:
  4. msg: >-
  5. Your configuration contains a variable, which now has a different name.
  6. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  7. when: "item.old in vars"
  8. with_items:
  9. - {'old': 'matrix_nginx_proxy_matrix_client_api_addr_with_proxy_container', 'new': 'matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container'}
  10. - {'old': 'matrix_nginx_proxy_matrix_client_api_addr_sans_proxy_container', 'new': 'matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container'}
  11. # People who configured this to disable Riot, would now wish to be disabling Element.
  12. # We now also have `matrix_nginx_proxy_proxy_riot_compat_redirect_`, but that's something else and is disabled by default.
  13. - {'old': 'matrix_nginx_proxy_proxy_riot_enabled', 'new': 'matrix_nginx_proxy_proxy_element_enabled'}
  14. - {'old': 'matrix_ssl_lets_encrypt_renew_cron_time_definition', 'new': '<not configurable anymore>'}
  15. - {'old': 'matrix_nginx_proxy_reload_cron_time_definition', 'new': '<not configurable anymore>'}
  16. - {'old': 'matrix_nginx_proxy_container_labels_traefik_proxy_matrix_rule', 'new': '<split into matrix_nginx_proxy_container_labels_traefik_proxy_matrix_client_rule and matrix_nginx_proxy_container_labels_traefik_proxy_matrix_federation_rule>'}
  17. - {'old': 'matrix_nginx_proxy_container_labels_traefik_proxy_matrix_hostname', 'new': '<split into matrix_nginx_proxy_container_labels_traefik_proxy_matrix_client_hostname and matrix_nginx_proxy_container_labels_traefik_proxy_matrix_federation_hostname>'}
  18. - name: Fail on unknown matrix_ssl_retrieval_method
  19. ansible.builtin.fail:
  20. msg: >-
  21. `matrix_ssl_retrieval_method` needs to be set to a known value.
  22. when: "matrix_ssl_retrieval_method not in ['lets-encrypt', 'self-signed', 'manually-managed', 'none']"
  23. - name: Fail on unknown matrix_nginx_proxy_ssl_config
  24. ansible.builtin.fail:
  25. msg: >-
  26. `matrix_nginx_proxy_ssl_preset` needs to be set to a known value.
  27. when: "matrix_nginx_proxy_ssl_preset not in ['modern', 'intermediate', 'old']"
  28. - name: Fail if Basic Auth enabled for metrics, but no credentials supplied
  29. ansible.builtin.fail:
  30. msg: |
  31. Enabling Basic Auth for metrics (`matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_enabled`) requires:
  32. - either a username/password (provided in `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_username` and `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_password`)
  33. - or raw htpasswd content (provided in `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_raw_content`)
  34. when: "matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_enabled | bool and (matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_raw_content == '' and (matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_username == '' or matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_password == ''))"
  35. - when: "matrix_ssl_retrieval_method == 'lets-encrypt'"
  36. block:
  37. - name: (Deprecation) Catch and report renamed settings
  38. ansible.builtin.fail:
  39. msg: >-
  40. Your configuration contains a variable, which now has a different name.
  41. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  42. with_items:
  43. - {'old': 'host_specific_matrix_ssl_support_email', 'new': 'matrix_ssl_lets_encrypt_support_email'}
  44. - {'old': 'host_specific_matrix_ssl_lets_encrypt_support_email', 'new': 'matrix_ssl_lets_encrypt_support_email'}
  45. - {'old': 'matrix_nginx_proxy_proxy_synapse_workers_enabled_list', 'new': '<no longer used>'}
  46. when: "item.old in vars"
  47. - name: Fail if required variables are undefined
  48. ansible.builtin.fail:
  49. msg: "The `{{ item }}` variable must be defined and have a non-null value"
  50. with_items:
  51. - "matrix_ssl_lets_encrypt_support_email"
  52. - "matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container"
  53. - "matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container"
  54. - "matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container"
  55. - "matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container"
  56. when: "vars[item] == '' or vars[item] is none"
  57. - name: (Deprecation) Catch and report old metrics usage
  58. ansible.builtin.fail:
  59. msg: >-
  60. Your configuration contains a variable (`{{ item }}`), which refers to the old metrics collection system for Synapse,
  61. which exposed metrics on `https://matrix.DOMAIN/_synapse/metrics` and `https://matrix.DOMAIN/_synapse-worker-TYPE-ID/metrics`.
  62. We now recommend exposing Synapse metrics in another way, from another URL.
  63. Refer to the changelog for more details: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#2022-06-22
  64. with_items:
  65. - matrix_nginx_proxy_proxy_synapse_metrics
  66. - matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled
  67. - matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_key
  68. when: "item in vars"