mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
Merged in DCD-797-restore_independent-of_db_init_role (pull request #61)
DCD-797: Make restore work without requiring database_init role to be run * DCD-797: Make restore work without requiring database_init role to be run * DCD-797: Fixes error with yaml lint * DCD-797: Adds check before running restore database tasks * DCD-797: Restore a database when either db_creted.changed is true or when `atl_force_db_restore` variable is set to true * DCD-797: set default filter to return a default value when the argument is a python false-y value. Update readme to reflect name of extra var env variable Approved-by: Ben Partridge <bpartridge@atlassian.com> Approved-by: Steve Smith <ssmith@atlassian.com>
This commit is contained in:
@@ -47,11 +47,11 @@ directly, the command for this would look like the following:
|
||||
-i inv/aws_node_local aws_jira_dc_node.yml
|
||||
|
||||
You can also do this on a CloudFormation template where the stack details are in `/etc/atl`.
|
||||
On such templates, the variable `ATL_ANSIBLE_EXTRA_PARAMS` is added to the
|
||||
On such templates, the variable `ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS` is added to the
|
||||
`ansible-playbook` parameters in `bin/ansible-with-alt-env`. In this case you
|
||||
need to set it to:
|
||||
ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS="-e atl_product_download_url=http://s3.amazon.com/atlassian/jira-9.0.0-PRE-TEST.tar.gz -e atl_use_system_jdk=true -e atl_download_format=tarball"
|
||||
|
||||
ATL_ANSIBLE_EXTRA_PARAMS="-e atl_product_download_url=http://s3.amazon.com/atlassian/jira-9.0.0-PRE-TEST.tar.gz -e atl_use_system_jdk=true -e atl_download_format=tarball"
|
||||
|
||||
To set the same parameters in the AWS Quick Starts for
|
||||
[Jira Data Center](https://aws.amazon.com/quickstart/architecture/jira/),
|
||||
|
||||
@@ -85,6 +85,8 @@
|
||||
include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
|
||||
|
||||
# Restores the application database. If a var with name `atl_force_db_restore` is set to true, the database will be restored even when the database has not been created in the same playbook run.
|
||||
# This is done to accommodate running the restore role independent of the database_init role.
|
||||
- name: Restore application database
|
||||
postgresql_db:
|
||||
login_host: "{{ atl_db_host }}"
|
||||
@@ -106,8 +108,8 @@
|
||||
failed_when:
|
||||
- result.rc != 0
|
||||
- '"COMMENT ON EXTENSION" not in result.msg'
|
||||
when: db_created.changed and atl_backup_db_dest is defined
|
||||
|
||||
# default('false', true) filter makes the default filter return the specified default value for python False-y values (like an empty string)
|
||||
when: atl_backup_db_dest is defined and (db_created.changed or (atl_force_db_restore | default('false', true) | bool))
|
||||
|
||||
- name: Restore shared home
|
||||
include_tasks: "home_restore.yml"
|
||||
|
||||
Reference in New Issue
Block a user