Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

46 行
2.5 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 MDAD project contributors
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required appservice-irc 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_appservice_irc_appservice_token', when: true}
  13. - {'name': 'matrix_appservice_irc_homeserver_url', when: true}
  14. - {'name': 'matrix_appservice_irc_homeserver_token', when: true}
  15. - {'name': 'matrix_appservice_irc_database_hostname', when: "{{ matrix_appservice_irc_database_engine == 'postgres' }}"}
  16. - {'name': 'matrix_appservice_irc_container_network', when: true}
  17. # Our base configuration (`matrix_appservice_irc_configuration_yaml`) is not enough to
  18. # let the playbook run without errors.
  19. #
  20. # Unless the final configuration (`matrix_appservice_irc_configuration`) contains an `ircService` definition,
  21. # we'd fail generating the registration.yaml file with a non-helpful error.
  22. #
  23. # This is a safety check to ensure we fail earlier and in a nicer way.
  24. - name: Fail if no additional configuration provided
  25. ansible.builtin.fail:
  26. msg: >-
  27. Your Appservice IRC configuration is incomplete (lacking an `ircService.servers` configuration).
  28. You need to define one or more servers by either using `matrix_appservice_irc_ircService_servers`
  29. or by extending the base configuration with additional configuration in `matrix_appservice_irc_configuration_extension_yaml`.
  30. Overriding the whole bridge's configuration (`matrix_appservice_irc_configuration`) is yet another possibility.
  31. when: "matrix_appservice_irc_configuration.ircService.servers | length == 0"
  32. - name: (Deprecation) Catch and report renamed appservice-irc variables
  33. ansible.builtin.fail:
  34. msg: >-
  35. Your configuration contains a variable, which now has a different name.
  36. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  37. when: "item.old in vars"
  38. with_items:
  39. - {'old': 'matrix_appservice_irc_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_irc_container_http_host_bind_port>'}
  40. - {'old': 'matrix_appservice_irc_container_self_build', 'new': 'matrix_appservice_irc_container_image_self_build'}
  41. - {'old': 'matrix_appservice_irc_docker_image_name_prefix', 'new': 'matrix_appservice_irc_docker_image_registry_prefix'}