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.
 
 

41 lines
2.5 KiB

  1. ---
  2. - name: (Deprecation) Catch and report renamed mautrix-facebook 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_mautrix_facebook_public_endpoint', 'new': 'matrix_mautrix_facebook_appservice_public_prefix'}
  10. - {'old': 'matrix_mautrix_facebook_docker_image_name_prefix', 'new': 'matrix_mautrix_facebook_docker_image_registry_prefix'}
  11. - name: Fail if required mautrix-facebook settings not defined
  12. ansible.builtin.fail:
  13. msg: >-
  14. You need to define a required configuration setting (`{{ item.name }}`).
  15. when: "item.when | bool and vars[item.name] == ''"
  16. with_items:
  17. - {'name': 'matrix_mautrix_facebook_appservice_public_hostname', when: "{{ matrix_mautrix_facebook_appservice_public_enabled }}"}
  18. - {'name': 'matrix_mautrix_facebook_appservice_public_prefix', when: "{{ matrix_mautrix_facebook_appservice_public_enabled }}"}
  19. - {'name': 'matrix_mautrix_facebook_metrics_proxying_hostname', when: "{{ matrix_mautrix_facebook_metrics_proxying_enabled }}"}
  20. - {'name': 'matrix_mautrix_facebook_metrics_proxying_path_prefix', when: "{{ matrix_mautrix_facebook_metrics_proxying_enabled }}"}
  21. - {'name': 'matrix_mautrix_facebook_appservice_token', when: true}
  22. - {'name': 'matrix_mautrix_facebook_homeserver_token', when: true}
  23. - {'name': 'matrix_mautrix_facebook_container_network', when: true}
  24. - {'name': 'matrix_mautrix_facebook_homeserver_address', when: true}
  25. - {'name': 'matrix_mautrix_facebook_database_hostname', when: "{{ matrix_mautrix_facebook_database_engine == 'postgres' }}"}
  26. - when: "matrix_mautrix_facebook_database_engine == 'sqlite' and matrix_mautrix_facebook_docker_image.endswith(':da1b4ec596e334325a1589e70829dea46e73064b')"
  27. block:
  28. - name: Inject warning if on an old SQLite-supporting version
  29. ansible.builtin.set_fact:
  30. devture_playbook_runtime_messages_list: |
  31. {{
  32. devture_playbook_runtime_messages_list | default([])
  33. +
  34. [
  35. "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)"
  36. ]
  37. }}