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

37 строки
2.0 KiB

  1. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 Julian-Samuel Gebühr
  3. # SPDX-FileCopyrightText: 2022 MDAD project contributors
  4. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. - name: (Deprecation) Catch and report renamed maubot variables
  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_bot_maubot_management_interface_port', 'new': 'matrix_bot_maubot_server_port'}
  16. - {'old': 'matrix_bot_maubot_management_interface_http_bind_port', 'new': 'matrix_bot_maubot_container_management_interface_http_bind_port'}
  17. - {'old': 'matrix_bot_maubot_registration_shared_secret', 'new': 'matrix_bot_maubot_homeserver_secret'}
  18. - {'old': 'matrix_bot_maubot_container_image_name_prefix', 'new': 'matrix_bot_maubot_container_image_registry_prefix'}
  19. - name: Fail if required maubot settings not defined
  20. ansible.builtin.fail:
  21. msg: >-
  22. You need to define a required configuration setting (`{{ item.name }}`).
  23. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  24. with_items:
  25. - {'name': 'matrix_bot_maubot_hostname', when: true}
  26. - {'name': 'matrix_bot_maubot_path_prefix', when: true}
  27. - {'name': 'matrix_bot_maubot_unshared_secret', when: true}
  28. - {'name': 'matrix_bot_maubot_admins', when: true}
  29. - {'name': 'matrix_bot_maubot_database_hostname', when: "{{ matrix_bot_maubot_database_engine == 'postgres' }}"}
  30. - {'name': 'matrix_bot_maubot_container_network', when: true}
  31. - {'name': 'matrix_bot_maubot_homeserver_name', when: true}
  32. - {'name': 'matrix_bot_maubot_homeserver_url', when: true}
  33. - {'name': 'matrix_bot_maubot_initial_password', when: true}