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.

48 lines
2.8 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2024 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2019 Jason Locklin
  3. # SPDX-FileCopyrightText: 2022 László Várady
  4. # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. - name: (Deprecation) Catch and report renamed mautrix-facebook settings
  9. ansible.builtin.fail:
  10. msg: >-
  11. Your configuration contains a variable, which now has a different name.
  12. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  13. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  14. with_items:
  15. - {'old': 'matrix_mautrix_facebook_public_endpoint', 'new': 'matrix_mautrix_facebook_appservice_public_prefix'}
  16. - {'old': 'matrix_mautrix_facebook_docker_image_name_prefix', 'new': 'matrix_mautrix_facebook_docker_image_registry_prefix'}
  17. - name: Fail if required mautrix-facebook settings not defined
  18. ansible.builtin.fail:
  19. msg: >-
  20. You need to define a required configuration setting (`{{ item.name }}`).
  21. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  22. with_items:
  23. - {'name': 'matrix_mautrix_facebook_appservice_public_hostname', when: "{{ matrix_mautrix_facebook_appservice_public_enabled }}"}
  24. - {'name': 'matrix_mautrix_facebook_appservice_public_prefix', when: "{{ matrix_mautrix_facebook_appservice_public_enabled }}"}
  25. - {'name': 'matrix_mautrix_facebook_metrics_proxying_hostname', when: "{{ matrix_mautrix_facebook_metrics_proxying_enabled }}"}
  26. - {'name': 'matrix_mautrix_facebook_metrics_proxying_path_prefix', when: "{{ matrix_mautrix_facebook_metrics_proxying_enabled }}"}
  27. - {'name': 'matrix_mautrix_facebook_appservice_token', when: true}
  28. - {'name': 'matrix_mautrix_facebook_homeserver_token', when: true}
  29. - {'name': 'matrix_mautrix_facebook_container_network', when: true}
  30. - {'name': 'matrix_mautrix_facebook_homeserver_address', when: true}
  31. - {'name': 'matrix_mautrix_facebook_database_hostname', when: "{{ matrix_mautrix_facebook_database_engine == 'postgres' }}"}
  32. - when: "matrix_mautrix_facebook_database_engine == 'sqlite' and matrix_mautrix_facebook_docker_image.endswith(':da1b4ec596e334325a1589e70829dea46e73064b')"
  33. block:
  34. - name: Inject warning if on an old SQLite-supporting version
  35. ansible.builtin.set_fact:
  36. devture_playbook_runtime_messages_list: |
  37. {{
  38. devture_playbook_runtime_messages_list | default([])
  39. +
  40. [
  41. "Note: Your mautrix-facebook bridge is still on SQLite and on the last version that supported it, before support was dropped. Support has been subsequently re-added in v0.3.2, so we advise you to upgrade (by removing your `matrix_mautrix_facebook_docker_image` definition from vars.yml)"
  42. ]
  43. }}