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 lines
1.4 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Fail if required s3-storage-provider settings not defined
  6. ansible.builtin.fail:
  7. msg: >-
  8. You need to define a required configuration setting (`{{ item }}`) for using s3-storage-provider.
  9. when: "vars[item] == ''"
  10. with_items:
  11. - "matrix_synapse_ext_synapse_s3_storage_provider_config_bucket"
  12. - "matrix_synapse_ext_synapse_s3_storage_provider_config_region_name"
  13. - "matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url"
  14. - name: Fail if required s3-storage-provider auth settings not defined when not using an EC2 profile
  15. ansible.builtin.fail:
  16. msg: >-
  17. You need to define a required configuration setting (`{{ item }}`) for using s3-storage-provider.
  18. when: "not matrix_synapse_ext_synapse_s3_storage_provider_config_ec2_instance_profile | bool and vars[item] == ''"
  19. with_items:
  20. - "matrix_synapse_ext_synapse_s3_storage_provider_config_access_key_id"
  21. - "matrix_synapse_ext_synapse_s3_storage_provider_config_secret_access_key"
  22. - name: Fail if required matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url looks invalid
  23. ansible.builtin.fail:
  24. msg: >-
  25. `matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url` needs to look like a URL (`http://` or `https://` prefix).
  26. when: "not matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url.startswith('http')"