Skip to content

Commit

Permalink
Merge pull request #32 from stackhpc/feature/kolla-ansible-wrapper
Browse files Browse the repository at this point in the history
kolla-ansible run wrapper script
  • Loading branch information
jovial authored Apr 12, 2023
2 parents 97259c2 + 76c41bf commit d9d1790
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/kolla-ansible-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -euE
set -o pipefail

PARENT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${PARENT}/../functions"

function main {
kolla_command=("${@:1}")
log_info "Running kolla-ansible command: args: ${kolla_command[@]}"
kayobe_init
# NOTE: KAYOBE_CONFIG_PATH gets defined by kayobe_init
run_kayobe kolla ansible run "${kolla_command[@]}"
pull_request "${KAYOBE_AUTOMATION_CONTEXT_ENV_PATH}/src/kayobe-config"
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
if [ "$#" -lt 1 ]; then
die $LINENO "Error: You must provide a kolla ansible command to run" \
"Usage: kolla-ansible-run.sh <kolla ansible command>"
fi
main "${@:1}"
fi

0 comments on commit d9d1790

Please sign in to comment.