mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-686: Only restore DB when it is a new one.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
lc_collate: "{{ atl_jdbc_collation }}"
|
||||
lc_ctype: "{{ atl_jdbc_ctype }}"
|
||||
template: "{{ atl_jdbc_template }}"
|
||||
when: atl_backup_db_dest is not defined
|
||||
register: db_create
|
||||
|
||||
- name: Restore application database
|
||||
postgresql_db:
|
||||
@@ -51,8 +51,7 @@
|
||||
# Depends on fetch_backup roles
|
||||
state: restore
|
||||
target: "{{ atl_backup_db_dest }}"
|
||||
target_opts: "--no-owner --role={{ atl_jdbc_user }}"
|
||||
when: atl_backup_db_dest is defined
|
||||
when: db_create.changed and atl_backup_db_dest is defined
|
||||
|
||||
tags:
|
||||
- new_only
|
||||
|
||||
Reference in New Issue
Block a user