Another push to get this out the door
This commit is contained in:
22
functions
Executable file
22
functions
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
REQUIREMENTS=".ansible/requirements.yml"
|
||||
|
||||
function run_playbook() {
|
||||
local play_path="$1"
|
||||
|
||||
if ! run test -f "$play_path"; then
|
||||
echo " $play_path not found or executable bit not set. Skipping ..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if run test -f "$REQUIREMENTS"; then
|
||||
echo " $REQUIREMENTS file found. Running it ..."
|
||||
ansible-galaxy install -fvf "$REQUIREMENTS"
|
||||
fi
|
||||
|
||||
echo " $play_path file found. Running it ..."
|
||||
ansible-playbook -i 127.0.0.1, --connection local -v "$play_path"
|
||||
}
|
Reference in New Issue
Block a user