Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

42 righe
2.0 KiB

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