]> arthur.barton.de Git - ansible-collection-boilerplate.git/blob - bin/a
Initial commit
[ansible-collection-boilerplate.git] / bin / a
1 #!/bin/sh
2 #
3 # Ansible Collection Boilerplate:
4 # "a": ansible(1) wrapper script.
5 #
6
7 # Change working directory to the base directory ...
8 cd "$(dirname "$0")/.." || exit 1
9
10 # Prepare environment ...
11 set -e
12 pwd
13 test -x "${PWD}/.venv/bin/ansible" || make "${PWD}/.venv/bin/ansible"
14
15 # Options ...
16 options=("$@")
17
18 [[ -r .ansible-vault-secret ]] && options+=("--vault-password-file=.ansible-vault-secret")
19
20 # Run ansible(1):
21 set -x
22 "${PWD}/.venv/bin/ansible" "${options[@]}"