diff --git a/README.md b/README.md index 51dc0f9..bfdf3dd 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,31 @@ sourced as environment variables to be retrieved at runtime . See the helper-script `bin/ansible-with-atl-env` and the corresponding `groups_vars/aws_node_local.yml` var-file. -### Maintenance playbooks +#### Overriding parameters -(None currently; TBW) +If you want to customise the playbook behaviour the simplest method is to fork +this repository and add your own. However, for some one-off tasks you can also +override the default and calculated settings with special values. To do this, +provide command-line overrides to +[ansible-playbook](https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html). + +The most likely use-case for this is to download a custom product distribution +for testing (for example, a pre-release version of Jira). If you are running +ansible-playbook directly, the command for this would look like the following: + + ansible-playbook \ + -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 \ + \ + -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 `ansible-playbook` parameters in `bin/ansible-with-alt-env`. In this case +you need to set it to: + + 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" ## Development diff --git a/bin/ansible-with-atl-env b/bin/ansible-with-atl-env index 14a9938..55b6e8e 100755 --- a/bin/ansible-with-atl-env +++ b/bin/ansible-with-atl-env @@ -15,4 +15,8 @@ set +a # Use Ansible from virtualenv if provided pipenv run \ - ansible-playbook -v -i $INV $PLAYBOOK 2>&1 | tee --append $LOG_FILE + ansible-playbook -v \ + $ATL_ANSIBLE_EXTRA_PARAMS \ + -i $INV \ + $PLAYBOOK \ + 2>&1 | tee --append $LOG_FILE