-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from stackhpc/feature/kolla-ansible-wrapper
kolla-ansible run wrapper script
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |