DCD-686: Move restore operations into the fetch role for the time being.

This commit is contained in:
Steve Smith
2019-10-10 11:05:20 +11:00
parent dddf3a86ec
commit 6f56925fa1
3 changed files with 59 additions and 20 deletions

View File

@@ -34,24 +34,7 @@
lc_collate: "{{ atl_jdbc_collation }}"
lc_ctype: "{{ atl_jdbc_ctype }}"
template: "{{ atl_jdbc_template }}"
register: db_create
- name: Restore application database
postgresql_db:
login_host: "{{ atl_db_host }}"
login_user: "{{ atl_db_root_user }}"
login_password: "{{ atl_db_root_password }}"
port: "{{ atl_db_port }}"
name: "{{ atl_jdbc_db_name }}"
owner: "{{ atl_jdbc_user }}"
encoding: "{{ atl_jdbc_encoding }}"
lc_collate: "{{ atl_jdbc_collation }}"
lc_ctype: "{{ atl_jdbc_ctype }}"
template: "{{ atl_jdbc_template }}"
# Depends on fetch_backup roles
state: restore
target: "{{ atl_backup_db_dest }}"
when: db_create.changed and atl_backup_db_dest is defined
register: db_created
tags:
- new_only