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

38 строки
2.1 KiB

  1. ---
  2. - name: Fail if required settings not defined
  3. ansible.builtin.fail:
  4. msg: >-
  5. You need to define a required configuration setting (`{{ item.name }}`).
  6. when: "item.when | bool and vars[item.name] == ''"
  7. with_items:
  8. - {'name': 'matrix_appservice_irc_appservice_token', when: true}
  9. - {'name': 'matrix_appservice_irc_homeserver_token', when: true}
  10. - {'name': 'matrix_appservice_irc_database_hostname', when: "{{ matrix_appservice_irc_database_engine == 'postgres' }}"}
  11. # Our base configuration (`matrix_appservice_irc_configuration_yaml`) is not enough to
  12. # let the playbook run without errors.
  13. #
  14. # Unless the final configuration (`matrix_appservice_irc_configuration`) contains an `ircService` definition,
  15. # we'd fail generating the registration.yaml file with a non-helpful error.
  16. #
  17. # This is a safety check to ensure we fail earlier and in a nicer way.
  18. - name: Fail if no additional configuration provided
  19. ansible.builtin.fail:
  20. msg: >-
  21. Your Appservice IRC configuration is incomplete (lacking an `ircService.servers` configuration).
  22. You need to define one or more servers by either using `matrix_appservice_irc_ircService_servers`
  23. or by extending the base configuration with additional configuration in `matrix_appservice_irc_configuration_extension_yaml`.
  24. Overriding the whole bridge's configuration (`matrix_appservice_irc_configuration`) is yet another possibility.
  25. when: "matrix_appservice_irc_configuration.ircService.servers | length == 0"
  26. - name: (Deprecation) Catch and report renamed appservice-irc variables
  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_appservice_irc_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_irc_container_http_host_bind_port>'}
  34. - {'old': 'matrix_appservice_irc_container_self_build', 'new': 'matrix_appservice_irc_container_image_self_build'}