Do not hardcode devture_postgres_identifier in matrix-media-repo role

This should come (and already does) from group_vars/matrix_servers
This commit is contained in:
Slavi Pantaleev 2024-01-09 16:02:31 +02:00
parent 7ad5321f54
commit 883afa11dc
3 changed files with 11 additions and 2 deletions

View File

@ -2720,6 +2720,7 @@ matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secr
###################################################################### ######################################################################
matrix_media_repo_enabled: false 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_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: | matrix_media_repo_container_additional_networks: |

View File

@ -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. # 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_username: "matrix_media_repo"
matrix_media_repo_database_password: "" 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_port: 5432
matrix_media_repo_database_name: "matrix_media_repo" matrix_media_repo_database_name: "matrix_media_repo"
matrix_media_repo_database_sslmode: disable matrix_media_repo_database_sslmode: disable

View File

@ -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: ansible.builtin.fail:
msg: >- msg: >-
Your configuration contains a variable, which now has a different name. Your configuration contains a variable, which now has a different name.