mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
DCD-224: Add wrapper script to import environment vars from file.
This commit is contained in:
16
bin/ansible-with-atl-env
Executable file
16
bin/ansible-with-atl-env
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Optionally take an environment file on the command-line for testing.
|
||||
INV=${1:?"Inventory file must be specified"}
|
||||
PLAYBOOK=${2:?"Playbook must be specified"}
|
||||
ENV_FILE=${3:-"/etc/atl"}
|
||||
|
||||
# Set the environment with default exports
|
||||
set -a
|
||||
source $ENV_FILE
|
||||
set +a
|
||||
|
||||
ansible-playbook -v -i $INV $PLAYBOOK
|
||||
|
||||
Reference in New Issue
Block a user