Files
dc-deployments-automation/bin/ansible-with-atl-env

17 lines
322 B
Bash
Executable File

#!/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