Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

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