Procházet zdrojové kódy

Make matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url required

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2330
pull/2332/head
Slavi Pantaleev před 3 roky
rodič
revize
d81e7d6328
2 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. +2
    -2
      docs/configuring-playbook-synapse-s3-storage-provider.md
  2. +2
    -1
      roles/custom/matrix-synapse/tasks/ext/s3-storage-provider/validate_config.yml

+ 2
- 2
docs/configuring-playbook-synapse-s3-storage-provider.md Zobrazit soubor

@@ -28,13 +28,13 @@ While you will need some local disk space around, it's only to accommodate usage

## Installing

After [creating the S3 bucket and configuring it](configuring-playbook-s3.md#bucket-creation-and-security-configuration), you can proceed to configure Goofys in your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`):
After [creating the S3 bucket and configuring it](configuring-playbook-s3.md#bucket-creation-and-security-configuration), you can proceed to configure `s3-storage-provider` in your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`):

```yaml
matrix_synapse_ext_synapse_s3_storage_provider_enabled: true
matrix_synapse_ext_synapse_s3_storage_provider_config_bucket: your-bucket-name
matrix_synapse_ext_synapse_s3_storage_provider_config_region_name: some-region-name # e.g. eu-central-1
matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url: https://.. # delete this whole line for Amazon S3
matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url: https://s3.REGION_NAME.amazonaws.com # adjust this
matrix_synapse_ext_synapse_s3_storage_provider_config_access_key_id: access-key-goes-here
matrix_synapse_ext_synapse_s3_storage_provider_config_secret_access_key: secret-key-goes-here
matrix_synapse_ext_synapse_s3_storage_provider_config_storage_class: STANDARD # or STANDARD_IA, etc.


+ 2
- 1
roles/custom/matrix-synapse/tasks/ext/s3-storage-provider/validate_config.yml Zobrazit soubor

@@ -10,9 +10,10 @@
- "matrix_synapse_ext_synapse_s3_storage_provider_config_region_name"
- "matrix_synapse_ext_synapse_s3_storage_provider_config_access_key_id"
- "matrix_synapse_ext_synapse_s3_storage_provider_config_secret_access_key"
- "matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url"

- name: Fail if required matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url looks invalid
ansible.builtin.fail:
msg: >-
`matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url` needs to look like a URL (`http://` or `https://` prefix).
when: "matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url != '' and not matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url.startswith('http')"
when: "matrix_synapse_ext_synapse_s3_storage_provider_config_endpoint_url.startswith('http')"

Načítá se…
Zrušit
Uložit