From 7ee06df3ba8e02e859c22cc90a9a9038cf63e244 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 5 Jan 2024 11:27:04 +0100 Subject: [PATCH] changed default postgres logic and optimized discourse postgres integration --- roles/docker-baserow/vars/main.yml | 1 - roles/docker-discourse/templates/app.yml.j2 | 2 ++ roles/docker-discourse/vars/main.yml | 1 - roles/docker-funkwhale/vars/main.yml | 1 - roles/docker-gitlab/README.md | 1 - roles/docker-gitlab/vars/main.yml | 1 - roles/docker-listmonk/vars/main.yml | 1 - roles/docker-mastodon/vars/main.yml | 1 - roles/docker-matrix-compose/vars/main.yml | 1 - roles/docker-openproject/vars/main.yml | 1 - vars/docker-database-service.yml.j2 | 2 +- 11 files changed, 3 insertions(+), 10 deletions(-) diff --git a/roles/docker-baserow/vars/main.yml b/roles/docker-baserow/vars/main.yml index f15802ea..456857cf 100644 --- a/roles/docker-baserow/vars/main.yml +++ b/roles/docker-baserow/vars/main.yml @@ -1,4 +1,3 @@ docker_compose_project_name: "baserow" database_password: "{{ baserow_database_password }}" -database_version: "{{ baserow_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-discourse/templates/app.yml.j2 b/roles/docker-discourse/templates/app.yml.j2 index e65e2ab7..a00ddeb3 100644 --- a/roles/docker-discourse/templates/app.yml.j2 +++ b/roles/docker-discourse/templates/app.yml.j2 @@ -8,7 +8,9 @@ ## visit http://www.yamllint.com/ to validate this file as needed templates: +{% if enable_central_database | bool %} - "templates/postgres.template.yml" +{% endif %} - "templates/redis.template.yml" - "templates/web.template.yml" ## Uncomment the next line to enable the IPv6 listener diff --git a/roles/docker-discourse/vars/main.yml b/roles/docker-discourse/vars/main.yml index c5f9fcd2..03bf487c 100644 --- a/roles/docker-discourse/vars/main.yml +++ b/roles/docker-discourse/vars/main.yml @@ -1,4 +1,3 @@ docker_compose_project_name: "discourse" database_password: "{{ baserow_database_password }}" -database_version: "{{ baserow_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-funkwhale/vars/main.yml b/roles/docker-funkwhale/vars/main.yml index 93b11fb6..f24e1a7b 100644 --- a/roles/docker-funkwhale/vars/main.yml +++ b/roles/docker-funkwhale/vars/main.yml @@ -1,5 +1,4 @@ docker_compose_project_name: "funkwhale" nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;" database_password: "{{funkwhale_database_password}}" -database_version: "{{ funkwhale_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-gitlab/README.md b/roles/docker-gitlab/README.md index 3d0a7b46..0b0536be 100644 --- a/roles/docker-gitlab/README.md +++ b/roles/docker-gitlab/README.md @@ -17,7 +17,6 @@ This Ansible role is designed for setting up and managing a GitLab server runnin Variables are defined in `vars/main.yml`. Key variables include: - `docker_compose_instance_directory`: Directory for Docker Compose instances. - `docker_compose_project_name`, `database_host`, `database_databasename`, `database_username`, `database_password`: Database configuration variables. -- `database_version`: PostgreSQL version, with a default fallback. ## Handlers - `recreate gitlab`: Restarts GitLab using Docker Compose when changes are detected. diff --git a/roles/docker-gitlab/vars/main.yml b/roles/docker-gitlab/vars/main.yml index ef475572..e4c19830 100644 --- a/roles/docker-gitlab/vars/main.yml +++ b/roles/docker-gitlab/vars/main.yml @@ -1,4 +1,3 @@ docker_compose_project_name: "gitlab" database_password: "{{gitlab_database_password}}" -database_version: "{{ gitlab_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-listmonk/vars/main.yml b/roles/docker-listmonk/vars/main.yml index d2346765..5a499795 100644 --- a/roles/docker-listmonk/vars/main.yml +++ b/roles/docker-listmonk/vars/main.yml @@ -1,4 +1,3 @@ docker_compose_project_name: "listmonk" database_password: "{{listmonk_database_password}}" -database_version: "{{ listmonk_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-mastodon/vars/main.yml b/roles/docker-mastodon/vars/main.yml index c1109043..c7a8027b 100644 --- a/roles/docker-mastodon/vars/main.yml +++ b/roles/docker-mastodon/vars/main.yml @@ -1,4 +1,3 @@ docker_compose_project_name: "mastodon" database_password: "{{mastodon_database_password}}" -database_version: "{{ mastodon_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-matrix-compose/vars/main.yml b/roles/docker-matrix-compose/vars/main.yml index a12a70a2..3b0d1d12 100644 --- a/roles/docker-matrix-compose/vars/main.yml +++ b/roles/docker-matrix-compose/vars/main.yml @@ -1,5 +1,4 @@ --- docker_compose_project_name: "matrix" database_password: "{{matrix_database_password}}" -database_version: "{{ baserow_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/roles/docker-openproject/vars/main.yml b/roles/docker-openproject/vars/main.yml index a7bf3353..aff7ae96 100644 --- a/roles/docker-openproject/vars/main.yml +++ b/roles/docker-openproject/vars/main.yml @@ -5,5 +5,4 @@ docker_compose_file_path: "{{docker_compose_instance_directory}}docker docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml" database_password: "{{openproject_database_password}}" repository_address: "https://github.com/opf/openproject-deploy" -database_version: "{{ openproject_database_version | default(postgres_default_version) }}" database_type: "postgres" \ No newline at end of file diff --git a/vars/docker-database-service.yml.j2 b/vars/docker-database-service.yml.j2 index 6cb15fd2..4ee891bb 100644 --- a/vars/docker-database-service.yml.j2 +++ b/vars/docker-database-service.yml.j2 @@ -2,5 +2,5 @@ docker_compose_instance_directory: "{{ path_docker_compose_instances + docker_c 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