Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 rivejä
1.5 KiB

  1. ---
  2. - name: Fail if required appservice-discord 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_discord_client_id', when: true}
  9. - {'name': 'matrix_appservice_discord_bot_token', when: true}
  10. - {'name': 'matrix_appservice_discord_appservice_token', when: true}
  11. - {'name': 'matrix_appservice_discord_homeserver_token', when: true}
  12. - {'name': 'matrix_appservice_discord_homeserver_domain', when: true}
  13. - {'name': 'matrix_appservice_discord_container_network', when: true}
  14. - {'name': 'matrix_appservice_discord_database_hostname', when: "{{ matrix_appservice_discord_database_engine == 'postgres' }}"}
  15. - name: (Deprecation) Catch and report renamed appservice-discord variables
  16. ansible.builtin.fail:
  17. msg: >-
  18. Your configuration contains a variable, which now has a different name.
  19. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  20. when: "item.old in vars"
  21. with_items:
  22. - {'old': 'matrix_appservice_discord_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_discord_container_http_host_bind_port>'}
  23. - name: Require a valid database engine
  24. ansible.builtin.fail:
  25. msg: "`matrix_appservice_discord_database_engine` needs to be either 'sqlite' or 'postgres'"
  26. when: "matrix_appservice_discord_database_engine not in ['sqlite', 'postgres']"