mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-05-12 08:14:56 +02:00
Refactored database_password and solved related bugs
This commit is contained in:
parent
3405f3a8f9
commit
064dd01508
@ -3,6 +3,7 @@
|
||||
- name: "Display all database variables"
|
||||
debug:
|
||||
msg: |
|
||||
database_application_id: "{{ database_application_id | default('undefined') }}"
|
||||
database_instance: "{{ database_instance | default('undefined') }}"
|
||||
database_name: "{{ database_name | default('undefined') }}"
|
||||
database_type: "{{ database_type | default('undefined') }}"
|
||||
|
@ -1,3 +1,7 @@
|
||||
- name: "set _tmp_database_application_id (Needed due to lazzy loading issue)"
|
||||
set_fact:
|
||||
database_application_id: "{{ application_id }}"
|
||||
|
||||
- name: "Load database variables"
|
||||
include_vars: "{{ item }}"
|
||||
loop:
|
||||
|
@ -1,7 +1,8 @@
|
||||
database_instance: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',application_id) else application_id }}"
|
||||
database_host: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',application_id) else 'database' }}"
|
||||
database_name: "{{ applications[application_id].database.name | default( application_id ) }}" # The overwritte configuration is needed by bigbluebutton
|
||||
database_username: "{{ applications[application_id].database.username | default( application_id )}}" # The overwritte configuration is needed by bigbluebutton
|
||||
database_instance: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',database_application_id) else database_application_id }}"
|
||||
database_host: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',database_application_id) else 'database' }}"
|
||||
database_name: "{{ applications[database_application_id].database.name | default( database_application_id ) }}" # The overwritte configuration is needed by bigbluebutton
|
||||
database_username: "{{ applications[database_application_id].database.username | default( database_application_id )}}" # The overwritte configuration is needed by bigbluebutton
|
||||
database_password: "{{ applications[database_application_id].credentials.database_password }}"
|
||||
database_port: "{{ 3306 if database_type == 'mariadb' else 5432 }}"
|
||||
database_env: "{{docker_compose.directories.env}}{{database_type}}.env"
|
||||
database_url_jdbc: "jdbc:{{ database_type if database_type == 'mariadb' else 'postgresql' }}://{{ database_host }}:{{ database_port }}/{{ database_name }}"
|
||||
|
@ -1,5 +1,3 @@
|
||||
application_id: "espocrm"
|
||||
# Password for the espocrm DB user (taken from inventory applications dict)
|
||||
database_password: "{{ applications[application_id].credentials.database_password }}"
|
||||
# EspoCRM uses MySQL/MariaDB
|
||||
database_type: "mariadb"
|
@ -1,6 +1,5 @@
|
||||
application_id: "funkwhale"
|
||||
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
database_type: "postgres"
|
||||
media_root: "/srv/funkwhale/data/"
|
||||
static_root: "{{media_root}}static"
|
||||
|
@ -1,3 +1,2 @@
|
||||
application_id: "gitea"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
database_type: "mariadb"
|
@ -1,3 +1,2 @@
|
||||
application_id: "gitlab"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
database_type: "postgres"
|
@ -1,6 +1,5 @@
|
||||
application_id: "keycloak"
|
||||
database_type: "postgres"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
container_name: "{{application_id}}_application"
|
||||
realm: "{{primary_domain}}" # This is the name of the default realm which is used by the applications
|
||||
import_directory_host: "{{docker_compose.directories.volumes}}import/" # Directory in which keycloack import files are placed on the host
|
||||
|
@ -1,5 +1,4 @@
|
||||
application_id: "listmonk"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
database_type: "postgres"
|
||||
|
||||
listmonk_settings:
|
||||
|
@ -1,3 +1,2 @@
|
||||
application_id: "mastodon"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
database_type: "postgres"
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
application_id: "matomo"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{ applications[application_id].credentials.database_password }}"
|
||||
|
||||
# I don't know if this is still necessary
|
||||
domain: "{{ domains[application_id] }}"
|
@ -52,7 +52,7 @@ devture_traefik_config_certificatesResolvers_acme_email: "{{users.administrator.
|
||||
#
|
||||
# The playbook creates additional Postgres users and databases (one for each enabled service)
|
||||
# using this superuser account.
|
||||
devture_postgres_connection_password: "{{applications[application_id].credentials.database_password}}"
|
||||
devture_postgres_connection_password: "{{database_password}}"
|
||||
|
||||
# By default, we configure Coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file.
|
||||
# If this value is an external IP address, you can skip this section.
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
application_id: "matrix"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
database_type: "postgres"
|
||||
registration_file_folder: "/data/"
|
||||
well_known_directory: "{{nginx.directories.data.well_known}}/matrix/"
|
||||
|
@ -2,7 +2,7 @@ MOODLE_DATABASE_HOST={{database_host}}
|
||||
MOODLE_DATABASE_PORT_NUMBER={{database_port}}
|
||||
MOODLE_DATABASE_USER={{database_username}}
|
||||
MOODLE_DATABASE_NAME={{database_name}}
|
||||
applications[application_id].credentials.database_password={{database_password}}
|
||||
MOODLE_DATABASE_PASSWORD={{database_password}}
|
||||
ALLOW_EMPTY_PASSWORD=no
|
||||
MOODLE_SITE_NAME="{{applications.moodle.site_titel}}"
|
||||
MOODLE_SSLPROXY=yes
|
||||
|
@ -1,6 +1,5 @@
|
||||
application_id: "openproject"
|
||||
docker_repository_address: "https://github.com/opf/openproject-deploy"
|
||||
database_password: "{{ applications[application_id].credentials.database_password }}"
|
||||
database_type: "postgres"
|
||||
|
||||
openproject_plugins_service: "{{docker_compose.directories.services}}plugins/"
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Database / Postgres service configuration
|
||||
POSTGRES_USER={{database_username}}
|
||||
POSTGRES_PASSWORD={{applications[application_id].credentials.database_password}}
|
||||
POSTGRES_PASSWORD={{database_password}}
|
||||
POSTGRES_DB={{database_name}}
|
||||
PEERTUBE_DB_USERNAME={{database_username}}
|
||||
PEERTUBE_DB_PASSWORD={{applications[application_id].credentials.database_password}}
|
||||
PEERTUBE_DB_PASSWORD={{database_password}}
|
||||
PEERTUBE_DB_SSL=false
|
||||
PEERTUBE_DB_HOSTNAME={{database_host}}
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
application_id: "peertube"
|
||||
database_type: "postgres"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
@ -1,6 +1,5 @@
|
||||
application_id: "pgadmin"
|
||||
database_type: "postgres"
|
||||
database_host: "{{ 'central-' + database_type if applications | is_feature_enabled('central_database',application_id)"
|
||||
database_var_file: "{{playbook_dir}}/roles/docker-central-database/vars/database.yml"
|
||||
pgadmin_user: 5050
|
||||
pgadmin_group: "{{pgadmin_user}}"
|
@ -1,4 +1,3 @@
|
||||
application_id: "pixelfed"
|
||||
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
|
@ -1,6 +1,5 @@
|
||||
application_id: "taiga"
|
||||
database_type: "postgres"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
docker_repository_address: "https://github.com/taigaio/taiga-docker"
|
||||
email_backend: "smtp" ## use an SMTP server or display the emails in the console (either "smtp" or "console")
|
||||
docker_compose_init: "{{docker_compose.directories.instance}}docker-compose-inits.yml.j2"
|
||||
|
@ -1,7 +1,6 @@
|
||||
application_id: "wordpress"
|
||||
wordpress_max_upload_size: "64M"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
||||
wordpress_custom_image: "wordpress_custom"
|
||||
wordpress_docker_html_path: "/var/www/html"
|
||||
host_msmtp_conf: "{{docker_compose.directories.config}}msmtprc.conf"
|
@ -1,3 +1,2 @@
|
||||
application_id: "yourls"
|
||||
database_type: "mariadb"
|
||||
database_password: "{{applications[application_id].credentials.database_password}}"
|
Loading…
x
Reference in New Issue
Block a user