Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

40 linhas
2.2 KiB

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