Use plain bash without function

This commit is contained in:
Luke Murphy 2020-03-19 02:05:30 +01:00
parent 37da3c6f61
commit 9966cb99c5
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 2 additions and 2 deletions

View File

@ -7,12 +7,12 @@ REQUIREMENTS=".ansible/requirements.yml"
function run_playbook() {
local play_path="$1"
if ! run test -f "$play_path"; then
if [[ ! -f "$play_path" ]]; then
echo " $play_path not found or executable bit not set. Skipping ..."
exit 0
fi
if run test -f "$REQUIREMENTS"; then
if [[ -f "$REQUIREMENTS" ]]; then
echo " $REQUIREMENTS file found. Running it ..."
ansible-galaxy install -fvf "$REQUIREMENTS"
fi