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

42 строки
2.6 KiB

  1. # SPDX-FileCopyrightText: 2024 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Fail if required baibot settings not defined
  6. ansible.builtin.fail:
  7. msg: >-
  8. You need to define a required configuration setting (`{{ item.name }}`).
  9. when: "item.when | bool and vars[item.name] == ''"
  10. with_items:
  11. - {'name': 'matrix_bot_baibot_config_user_mxid_localpart', when: true}
  12. - {'name': 'matrix_bot_baibot_config_user_password', when: true}
  13. - {'name': 'matrix_bot_baibot_container_network', when: true}
  14. - {'name': 'matrix_bot_baibot_config_homeserver_url', when: true}
  15. - {'name': 'matrix_bot_baibot_config_agents_static_definitions_anthropic_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_anthropic_enabled }}"}
  16. - {'name': 'matrix_bot_baibot_config_agents_static_definitions_groq_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_groq_enabled }}"}
  17. - {'name': 'matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_model_id', when: "{{ matrix_bot_baibot_config_agents_static_definitions_groq_enabled and matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_enabled }}"}
  18. - {'name': 'matrix_bot_baibot_config_agents_static_definitions_mistral_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_mistral_enabled }}"}
  19. - {'name': 'matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_model_id', when: "{{ matrix_bot_baibot_config_agents_static_definitions_mistral_enabled and matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_enabled }}"}
  20. - {'name': 'matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_openai_enabled }}"}
  21. - name: Fail if admin patterns list is empty
  22. ansible.builtin.fail:
  23. msg: >-
  24. You need to define a required configuration setting (`matrix_bot_baibot_config_access_admin_patterns`) to specify which users are bot administrators.
  25. when: "matrix_bot_baibot_config_access_admin_patterns | length == 0"
  26. - name: (Deprecation) Catch and report renamed baibot 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_baibot_container_image_name_prefix', 'new': 'matrix_bot_baibot_container_image_registry_prefix'}