#!/usr/bin/env bash
#
# Ansible Collection Boilerplate:
# "a": ansible(1) wrapper script.
#

set -eu -o pipefail

# Change working directory to the base directory ...
cd "$(dirname "$0")/.." || exit 1

# Enable the Python "virtual environment" when one exists:
if [[ -r .venv/bin/activate ]]; then
	# shellcheck disable=SC1091
	. .venv/bin/activate
fi

# Run ansible(1):
set -x
exec ansible "$@"
