---

- name: Fail if required matrix-appservice-polychat settings not defined
  ansible.builtin.fail:
    msg: >-
      You need to define a required configuration setting (`{{ item }}`).
  when: "vars[item] == ''"
  with_items:
    - matrix_appservice_polychat_appservice_token
    - matrix_appservice_polychat_homeserver_url
    - matrix_appservice_polychat_homeserver_token
    - matrix_appservice_polychat_id_token
    - matrix_appservice_polychat_container_network
    - matrix_appservice_polychat_hostname
    - matrix_appservice_polychat_path_prefix
