Optimized database backup seeder implementation

This commit is contained in:
2025-04-21 16:16:54 +02:00
parent f8c984d6c2
commit b0dd574c26
7 changed files with 24 additions and 18 deletions

View File

@@ -23,14 +23,19 @@
database_password is defined)
- name: "seed database values in directory {{ backup_docker_to_local_folder }}"
command:
cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_name}} {{database_username}} {{database_password}}"
command: >
python database_entry_seeder.py databases.csv
"{{ database_instance }}"
"{{ database_name }}"
"{{ database_username }}"
"{{ database_password }}"
args:
chdir: "{{ backup_docker_to_local_folder }}"
when: >
database_instance is defined and
database_name is defined and
database_username is defined and
database_password is defined
when:
- database_instance is defined
- database_name is defined
- database_username is defined
- database_password is defined
- name: Set file permissions for databases.csv to be readable, writable, and executable by root only
ansible.builtin.file:

View File

@@ -3,9 +3,9 @@ bbb_repository_directory: "{{ docker_compose.directories.services }}"
docker_compose_file_origine: "{{ docker_compose.directories.services }}docker-compose.yml"
docker_compose_file_final: "{{ docker_compose.directories.instance }}docker-compose.yml"
database_instance: "bigbluebutton"
database_name: "greenlight-v3"
database_name: "" # Database name is empty, because bb uses multiple databases
database_username: "postgres"
database_password: "{{applications.bigbluebutton.postgresql_secret}}"
database_password: "{{ applications.bigbluebutton.credentials.postgresql_secret }}"
domain: "{{ domains[application_id] }}"
http_port: "{{ ports.localhost.http[application_id] }}"
bbb_env_file_link: "{{ docker_compose.directories.instance }}.env"

View File

@@ -1,2 +1,2 @@
configuration_destination: "{{nginx.directories.http.servers}}{{domain}}.conf"
final_oauth2_enabled: "{{applications[application_id].get('oauth2_proxy', {}).get('enabled', False)}}"
final_oauth2_enabled: "{{applications[application_id].get('features', {}).get('oauth2', False)}}"

View File

@@ -6,15 +6,9 @@
cmd: "pkgmgr update pkgmgr"
when: run_once_pkgmgr_update is not defined
- name: clone {{ package_name }}
command:
cmd: "pkgmgr clone {{ package_name }} --clone-mode https"
notify: "{{ package_notify | default(omit) }}"
ignore_errors: true
- name: update {{ package_name }}
command:
cmd: "pkgmgr update {{ package_name }} --dependencies"
cmd: "pkgmgr update {{ package_name }} --dependencies --clone-mode https"
notify: "{{ package_notify | default(omit) }}"
- name: mark pkgmgr update as done