From b909e872288d4d6df96c867961e2d941ca84a6a4 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 6 Jan 2024 14:22:41 +0100 Subject: [PATCH] Implemented new seeder function --- roles/backup-docker-to-local/tasks/main.yml | 2 +- vars/docker-database-service.yml.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/backup-docker-to-local/tasks/main.yml b/roles/backup-docker-to-local/tasks/main.yml index 2d7ed8a3..14ff4563 100644 --- a/roles/backup-docker-to-local/tasks/main.yml +++ b/roles/backup-docker-to-local/tasks/main.yml @@ -43,7 +43,7 @@ - name: seed database values command: - cmd: "python database_entry_seeder.py databases.csv {{docker_compose_project_name}} {{database_host}} {{database_databasename}} {{database_username}} {{database_password}}" + cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_databasename}} {{database_username}} {{database_password}}" chdir: "{{backup_docker_to_local_folder}}" when: > database_host is defined or diff --git a/vars/docker-database-service.yml.j2 b/vars/docker-database-service.yml.j2 index 4ee891bb..020a9a3d 100644 --- a/vars/docker-database-service.yml.j2 +++ b/vars/docker-database-service.yml.j2 @@ -1,6 +1,6 @@ docker_compose_instance_directory: "{{ path_docker_compose_instances + docker_compose_project_name + '/' }}" +database_instance: "{{ 'central-' + database_type if enable_central_database else docker_compose_project_name }}" database_host: "{{ 'central-' + database_type if enable_central_database else 'database' }}" database_databasename: "{{ docker_compose_project_name }}" database_username: "{{ docker_compose_project_name }}" -database_version: "{{ postgres_default_version }}" -# This will lead to problems with bbb and openproject \ No newline at end of file +database_version: "{{ postgres_default_version }}" \ No newline at end of file