Semi bsr for applications[] to prevent heavy to debug bugs in j2 - part 1

This commit is contained in:
2025-07-13 15:11:38 +02:00
parent 4cc4195fab
commit 756597668c
107 changed files with 277 additions and 277 deletions

View File

@@ -5,4 +5,4 @@
- name: "configure pgadmin servers"
include_tasks: configuration.yml
when: applications[application_id].server_mode | bool
when: applications | get_app_conf(application_id, 'server_mode', True) | bool

View File

@@ -2,7 +2,7 @@
application:
{% set container_port = 80 %}
image: dpage/pgadmin4:{{applications[application_id].version}}
image: dpage/pgadmin4:{{applications | get_app_conf(application_id, 'version', True)}}
container_name: pgadmin
{% include 'roles/docker-container/templates/base.yml.j2' %}
ports:
@@ -12,7 +12,7 @@
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
volumes:
- "data:/var/lib/pgadmin"
{% if applications[application_id].server_mode | bool %}
{% if applications | get_app_conf(application_id, 'server_mode', True) | bool %}
- "{{ pgadmin_host_server_file }}:{{ pgadmin_docker_server_file }}"
- "{{ pgadmin_host_password_file }}:{{ pgadmin_docker_password_file }}"
{% endif %}

View File

@@ -4,12 +4,12 @@
PGADMIN_DISABLE_POSTFIX=True
# Default login email for server mode
PGADMIN_DEFAULT_EMAIL={{ applications[application_id].users.administrator.email }}
PGADMIN_DEFAULT_EMAIL={{ applications | get_app_conf(application_id, 'users.administrator.email', True) }}
# Default login password for server mode
PGADMIN_DEFAULT_PASSWORD={{ applications[application_id].credentials.administrator_password }}
PGADMIN_DEFAULT_PASSWORD={{ applications | get_app_conf(application_id, 'credentials.administrator_password', True) }}
{% if applications[application_id].server_mode | bool %}
{% if applications | get_app_conf(application_id, 'server_mode', True) | bool %}
# Load server connection settings from this JSON file
PGADMIN_SERVER_JSON_FILE={{ pgadmin_docker_server_file }}
@@ -17,5 +17,5 @@ PGADMIN_SERVER_JSON_FILE={{ pgadmin_docker_server_file }}
PGADMIN_CONFIG_SERVER_MODE=False
# Disable master password prompt for stored credentials
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED={{ applications[application_id].master_password_required | capitalize }}
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED={{ applications | get_app_conf(application_id, 'master_password_required', True) | capitalize }}
{% endif %}