mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Add optional logging of playbook output.
This commit is contained in:
@@ -5,11 +5,12 @@ set -e
|
|||||||
# Optionally take an environment file on the command-line for testing.
|
# Optionally take an environment file on the command-line for testing.
|
||||||
INV=${1:?"Inventory file must be specified"}
|
INV=${1:?"Inventory file must be specified"}
|
||||||
PLAYBOOK=${2:?"Playbook must be specified"}
|
PLAYBOOK=${2:?"Playbook must be specified"}
|
||||||
ENV_FILE=${3:-"/etc/atl"}
|
LOG_FILE=${3:-"/dev/null"}
|
||||||
|
ENV_FILE=${4:-"/etc/atl"}
|
||||||
|
|
||||||
# Set the environment with default exports
|
# Set the environment with default exports
|
||||||
set -a
|
set -a
|
||||||
source $ENV_FILE
|
source $ENV_FILE
|
||||||
set +a
|
set +a
|
||||||
|
|
||||||
ansible-playbook -v -i $INV $PLAYBOOK
|
ansible-playbook -v -i $INV $PLAYBOOK | tee --append $LOG_FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user