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

44 строки
2.2 KiB

  1. # SPDX-FileCopyrightText: 2023 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2023 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required Chatgpt settings not defined
  7. ansible.builtin.fail:
  8. msg: >-
  9. You need to define a required configuration setting (`{{ item.name }}`).
  10. when: "item.when | bool and vars[item.name] == ''"
  11. with_items:
  12. - {'name': 'matrix_bot_chatgpt_openai_api_key', when: true}
  13. - {'name': 'matrix_bot_chatgpt_matrix_bot_username', when: true}
  14. - {'name': 'matrix_bot_chatgpt_container_network', when: true}
  15. - {'name': 'matrix_bot_chatgpt_matrix_homeserver_url', when: true}
  16. - name: Fail if OpenAI configuration not up-to-date.
  17. ansible.builtin.fail:
  18. msg: >-
  19. Your configuration contains a varible that is no longer used.
  20. Please change your configuration to remove the variable (`{{ item.name }}`).
  21. when: "item.name in vars"
  22. with_items:
  23. - {'name': 'matrix_bot_chatgpt_openai_email'}
  24. - {'name': 'matrix_bot_chatgpt_openai_password'}
  25. - {'name': 'matrix_bot_chatgpt_openai_login_type'}
  26. - name: (Deprecation) Catch and report renamed ChatGPT settings
  27. ansible.builtin.fail:
  28. msg: >-
  29. Your configuration contains a variable, which now has a different name.
  30. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  31. when: "item.old in vars"
  32. with_items:
  33. - {'old': 'matrix_bot_chatgpt_docker_image', 'new': 'matrix_bot_chatgpt_container_image'}
  34. - {'old': 'matrix_bot_chatgpt_docker_image_name_prefix', 'new': 'matrix_bot_chatgpt_container_image_name_prefix'}
  35. - {'old': 'matrix_bot_chatgpt_docker_image_force_pull', 'new': 'matrix_bot_chatgpt_container_image_force_pull'}
  36. - {'old': 'matrix_bot_chatgpt_docker_repo', 'new': 'matrix_bot_chatgpt_container_image_self_build_repo'}
  37. - {'old': 'matrix_bot_chatgpt_docker_repo_version', 'new': 'matrix_bot_chatgpt_container_image_self_build_repo_version'}
  38. - {'old': 'matrix_bot_chatgpt_docker_src_files_path', 'new': 'matrix_bot_chatgpt_container_src_path'}
  39. - {'old': 'matrix_bot_chatgpt_container_image_name_prefix', 'new': 'matrix_bot_chatgpt_container_image_registry_prefix'}