Просмотр исходного кода

Do not hardcode devture_postgres_identifier in matrix-media-repo role

This should come (and already does) from group_vars/matrix_servers
pull/3086/head
Slavi Pantaleev 2 лет назад
Родитель
Сommit
883afa11dc
3 измененных файлов: 11 добавлений и 2 удалений
  1. +1
    -0
      group_vars/matrix_servers
  2. +1
    -1
      roles/custom/matrix-media-repo/defaults/main.yml
  3. +9
    -1
      roles/custom/matrix-media-repo/tasks/validate_config.yml

+ 1
- 0
group_vars/matrix_servers Просмотреть файл

@@ -2720,6 +2720,7 @@ matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secr
######################################################################

matrix_media_repo_enabled: false

matrix_media_repo_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else matrix_media_repo_identifier }}"

matrix_media_repo_container_additional_networks: |


+ 1
- 1
roles/custom/matrix-media-repo/defaults/main.yml Просмотреть файл

@@ -216,7 +216,7 @@ matrix_media_repo_federation_ignored_hosts: []
# user instead. Using the same server is fine, just not the same username and database.
matrix_media_repo_database_username: "matrix_media_repo"
matrix_media_repo_database_password: ""
matrix_media_repo_database_hostname: "{{ devture_postgres_identifier }}"
matrix_media_repo_database_hostname: ""
matrix_media_repo_database_port: 5432
matrix_media_repo_database_name: "matrix_media_repo"
matrix_media_repo_database_sslmode: disable


+ 9
- 1
roles/custom/matrix-media-repo/tasks/validate_config.yml Просмотреть файл

@@ -1,6 +1,14 @@
---

- name: (Deprecation) Catch and report renamed settings
- name: Fail if required matrix-media-repo settings not defined
ansible.builtin.fail:
msg: >
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] == ''"
with_items:
- {'name': 'matrix_media_repo_database_hostname', when: true}

- name: (Deprecation) Catch and report renamed matrix-media-repo settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.


Загрузка…
Отмена
Сохранить