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.
 
 

39 lines
2.5 KiB

  1. # SPDX-FileCopyrightText: 2021 Matthew Cengia
  2. # SPDX-FileCopyrightText: 2021 Shreyas Ajjarapu
  3. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  4. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. - name: Fail if required mautrix-twitter settings not defined
  9. ansible.builtin.fail:
  10. msg: >-
  11. You need to define a required configuration setting (`{{ item.name }}`).
  12. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  13. with_items:
  14. - {'name': 'matrix_mautrix_twitter_appservice_token', when: true}
  15. - {'name': 'matrix_mautrix_twitter_homeserver_address', when: true}
  16. - {'name': 'matrix_mautrix_twitter_homeserver_token', when: true}
  17. - {'name': 'matrix_mautrix_twitter_database_hostname', when: "{{ matrix_mautrix_twitter_database_engine == 'postgres' }}"}
  18. - {'name': 'matrix_mautrix_twitter_container_network', when: true}
  19. - {'name': 'matrix_mautrix_twitter_metrics_proxying_hostname', when: "{{ matrix_mautrix_twitter_metrics_proxying_enabled }}"}
  20. - {'name': 'matrix_mautrix_twitter_metrics_proxying_path_prefix', when: "{{ matrix_mautrix_twitter_metrics_proxying_enabled }}"}
  21. - name: (Deprecation) Catch and report renamed mautrix-twitter variables
  22. ansible.builtin.fail:
  23. msg: >-
  24. Your configuration contains a variable, which now has a different name.
  25. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  26. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  27. with_items:
  28. - {'old': 'matrix_mautrix_twitter_login_shared_secret', 'new': '<removed>'}
  29. - {'old': 'matrix_mautrix_twitter_appservice_database', 'new': 'matrix_mautrix_twitter_database_uri'}
  30. - {'old': 'matrix_mautrix_twitter_bridge_login_shared_secret_map', 'new': 'matrix_mautrix_twitter_double_puppet_secrets'}
  31. - {'old': 'matrix_mautrix_twitter_bridge_login_shared_secret_map_auto', 'new': 'matrix_mautrix_twitter_double_puppet_secrets_auto'}
  32. - {'old': 'matrix_mautrix_twitter_bridge_login_shared_secret_map_custom', 'new': 'matrix_mautrix_twitter_double_puppet_secrets_custom'}
  33. - {'old': 'matrix_mautrix_twitter_federate_rooms', 'new': 'matrix_mautrix_twitter_matrix_federate_rooms'}
  34. - {'old': 'matrix_mautrix_twitter_command_prefix', 'new': 'matrix_mautrix_twitter_bridge_command_prefix'}
  35. - {'old': 'matrix_mautrix_twitter_docker_image_name_prefix', 'new': 'matrix_mautrix_twitter_docker_image_registry_prefix'}