The playbook can install and configure synapse-simple-antispam for you.
It lets you fight invite-spam by automatically blocking invitiations from a list of servers specified by you (blacklisting).
See the project's documentation to learn what it does and why it might be useful to you.
Add the following configuration to your inventory/host_vars/matrix.example.com/vars.yml
file (adapt to your needs):
matrix_synapse_ext_spam_checker_synapse_simple_antispam_enabled: true
matrix_synapse_ext_spam_checker_synapse_simple_antispam_config_blocked_homeservers:
- example.com
- example.net