From d967f22776245500fbce533a1c6cb045e3acd107 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 13 Jan 2024 17:41:42 +0200 Subject: [PATCH] Upgrade postgres-backup and run it in its own container network, connected to the Postgres one --- templates/group_vars_mash_servers | 19 ++++++++++--------- templates/requirements.yml | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/templates/group_vars_mash_servers b/templates/group_vars_mash_servers index 3732114..a9e4ec2 100644 --- a/templates/group_vars_mash_servers +++ b/templates/group_vars_mash_servers @@ -888,19 +888,20 @@ devture_postgres_backup_architecture: "{{ mash_playbook_architecture }}" devture_postgres_backup_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}postgres-backup" -devture_postgres_backup_systemd_required_services_list: | - {{ - (['docker.service']) - + - ([(devture_postgres_identifier + '.service')] if devture_postgres_enabled else []) - }} - -devture_postgres_backup_container_network: "{{ devture_postgres_container_network }}" - devture_postgres_backup_uid: "{{ mash_playbook_uid }}" devture_postgres_backup_gid: "{{ mash_playbook_gid }}" # role-specific:postgres +devture_postgres_backup_systemd_required_services_list_auto: | + {{ + ([(devture_postgres_identifier + '.service')] if (devture_postgres_enabled and devture_postgres_backup_connection_hostname == devture_postgres_connection_hostname) else []) + }} + +devture_postgres_backup_container_additional_networks_auto: |- + {{ + ([devture_postgres_container_network] if (devture_postgres_enabled and devture_postgres_backup_connection_hostname == devture_postgres_connection_hostname and devture_postgres_backup_container_network != devture_postgres_container_network) else []) + }} + devture_postgres_backup_connection_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}" devture_postgres_backup_connection_port: "{{ devture_postgres_connection_port if devture_postgres_enabled else 5432 }}" devture_postgres_backup_connection_username: "{{ devture_postgres_connection_username if devture_postgres_enabled else '' }}" diff --git a/templates/requirements.yml b/templates/requirements.yml index e4c2435..e5b0019 100644 --- a/templates/requirements.yml +++ b/templates/requirements.yml @@ -221,7 +221,7 @@ name: postgres activation_prefix: devture_postgres_ - src: git+https://github.com/devture/com.devture.ansible.role.postgres_backup.git - version: b29a9c551dd09079f5ef26d494973a499088b9e8 + version: 9185490c32eadc4f06d5ba9c6eeea02704573065 name: postgres_backup activation_prefix: devture_postgres_backup_ - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus.git