From 7b1b4e0a82a6260483cccd2a573dd883a8afe05a Mon Sep 17 00:00:00 2001 From: Sven Ketelsen Date: Tue, 23 May 2023 20:08:12 +0200 Subject: [PATCH] DEV-1058 bugfix backup process - removed hard coded database server --- create-remote-database-backup.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/create-remote-database-backup.yml b/create-remote-database-backup.yml index e1615e0..b50560f 100644 --- a/create-remote-database-backup.yml +++ b/create-remote-database-backup.yml @@ -1,5 +1,14 @@ --- +# ****** ** ****** ** ** ** ** ******* # +# /*////** **** **////** /** ** /** /** /**////** # +# /* /** **//** ** // /** ** /** /** /** /** # +# /****** ** //** /** /**** /** /** /******* # +# /*//// ** ********** /** /**/** /** /** /**//// # +# /* /** /**//////** //** ** /**//** /** /** /** # +# /******* /** /** //****** /** //** //******* /** # +# /////// // // ////// // // /////// // # + # creates remote database backup # - postgres # - executed on stage specific server: {{ shared_service_postgres_secondary }} (currently: slave) @@ -25,12 +34,7 @@ connection: local gather_facts: false - pre_tasks: - - name: "Import constraints check" - import_tasks: tasks/constraints_check.yml - tags: - - always - + tasks: # add virtual server to load stage specific variables as context - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts" add_host: @@ -39,6 +43,17 @@ - "stage_{{ stage }}" changed_when: False +- hosts: "{{ stage }}-virtual-host-to-read-groups-vars" + serial: "{{ serial_number | default(1) }}" + gather_facts: false + connection: local + + pre_tasks: + - name: "Import constraints check" + import_tasks: tasks/constraints_check.yml + tags: + - always + tasks: - name: "Add {{ database_engine }} servers to hosts if necessary" add_host: @@ -63,7 +78,7 @@ name: "{{ stage }}-backup-01" groups: - "stage_{{ stage }}" - - storage + - "storage" ############################################################## ## Creating remote database backups for created inventory